Skip to main content
Showing results for 
Search instead for 
Did you mean: 
Contributor II
Contributor II

Dynamic measure selection for a line chart


I would like to make a dynamic measure selection for a line chart, but don't know where to begin. I have about 20 measures and I would like for the user to be able to select as many as they want and be able to compare them in a line chart.

Example: the user would want to see how waiting time affects customer satisfaction so the user could select the two measures and the line chart would show them. In addition, the user would want to also compare how employee happiness affects these two measures and adds that into the selections.

In this manner, the user should be able to choose any number of measures between 1-20 and they would show on a line chart.

Labels (1)
4 Replies
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi @MariaN 

I would suggest you download and take a look at how I do this in my Instant Sense Application template:

This application loads dimensions and measures from a spreadsheet and then allows the user to pick dimensions and measures from list boxes to compare values.

I think the maximum number of measures I have on on object presently is six, but you can copy and paste the measures and change the numbers in the call to the variable. So the expression for the sixth measure is =$(=$(vExpNFmt(6))) , you can copy that to get up to 20, if you wish. You would also need to set the label and the show condition for the measure accordingly. That will make more sense when you see the app!

There is a blog post on how the app is created here:

Hope you find it useful.




Champion III
Champion III

Create as list of all MEasure NAmes in your load script as below



Load * inline [








In the Line Chart Add ALL the MEASURES with calculation condition

Sales  = Sum(Sales)

Show Column if =  index('$(=GetFieldSelections(MeasuresList,''))','Sales')


Margin  = Sum(Margin)

Show Column if =  index('$(=GetFieldSelections(MeasuresList,''))','Margin')


Stock= Sum(Stock)

Show Column if =  index('$(=GetFieldSelections(MeasuresList,''))','Stock')


Stock ,Margin, Sales should match the MeasuresList values

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
Contributor II
Contributor II

Hey @vinieme12 !

Thank you for the response, but there is no option in the line chart measures to use the show condition.

Contributor II
Contributor II

Thank you @stevedark , I will look into this.