• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Godly Tip- How to use Index with charting data

Montrey

Member
Hello fello Board members. I would like to describe a recently discovered charting MUST HAVE.


As a dashboard developer, we are always looking for ways to add that extra "umph!" to our charts and what not. By adding Check boxes, Combo-boxes(drop down menus), and option buttons to a graph we can have tons of different graphs all in one. We can use the controls to give more power to the user. To change the data they want to view at the click of a button.


Sometimes though, building such a spreadsheet can be somewhat challenging. Finding the correct formulas and planning out dynamic ranges, making the file easy to update.. etc..


This is where the INDEX function comes to save the day. (I will upload a sample file too)For example:

Lets say we want to be able to look at 3 food outlets and compare this year vs. last year, with 2 different times slots Lunch & Dinner, and we also want to able to look at either Covers OR Sales for those each of those 2 time slots(lunch& dinner) WOW! tons of information right? How do we go about setting this information up so it all can be viewed on one graph!


This is where the index function comes in and say goodbye to if statements!

So we want the the graphed data(lunch& dinner) to change based on what outlet the user selected and what option they choose(either sales or covers).

Lets first break out our summarized data into categories. Take a look at the attached file to understand.


We then use the index function like so:

=index((range1,range2,range3,range4),,,(linked combo box cell))

Then press CTRL+shift+enter to create an array. Make sure to make the array the same size as the number of values you have. for instance if I had 30 days worth of data the array would be 30 lines big.


So what does the above do? It will choose the range which corresponds to its' outlet. Just make sure your ranges in the index function are in the same order as the combo box names. For instance, the combo box lists the outlets like this..outlet1, outlet2, outlet 3. Make sure your index function looks like this. =Index((rangeoutlet1, rangeoutlet2, rangeoutlet3),,,(linked combo box cell))


The last part of the formula chooses which range of data to pull. We can then use this same method for all 4 series of data we need to graph.

Series 1 - LunchTy

Series 2 - LunchLy

Series 3 - DinnerTy

Series 4 - DinnerLy

Create the arrays and bam! we are done!


Please take a look at the attached file and be amazed!!!(hopefully)

http://speedy.sh/Ww46m/exampleindex.xls
 
Hi Montrey,


Very Neat workout! :) This formula could have been even shorter if you had placed form control link cells on your data sheet. Besides that it is good one. I once found a dashboard from Chandoo (similar one, Performance KPI Dashboard) using offset() as well.


Regards,

Faseeh
 
Yea I've strayed away from offset because I found out it is a volatile function.(Volatile means all the formulas will re-calc after any sort of action in the file is taken) Also seeing the awesomeness of index and the possibilities, I love it now.
 
@SirJB7

Hi, myself!

So long...

I was just wondering why am I getting so hungry after opening the exampleindex.xls file...

Too much lunch, too much dinner, yeap, surely that...

Regards!


@Montrey

Hi!

Nice work, congrats.

Regards!

PS: BTW, ... something to eat?

PS2: Fortunately the data wasn't about... you know... that... yes...
 
hi montrey

nice post on index

i cannot download the xl spreadsheet.could you please tell what i should do to down load it.

when i click in the url link it takes to the speedyshare and then gives codes which when pasted does not downlaod the spreadsheet.thanks in advance.

jay
 
Yea the download link is right at the top of the page.


it is in big bold letters "Download: exampleindex.xls"

Then just click it. ;)
 
Back
Top