Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I am developing an App. I have a chart in Qlik which uses expressions to feed the data. I have two alternative states set up StateA and StateB. I am trying to get the bar chart to have two bars. One for each dimension and the data will be then stacked by different measures. Is this possible? If so does anyone know how i would the alternative states as dimensions?
Yeah buddy.
And the best part is you get to learn a super top secret, sworn to secrecy, cool function of Qlik ... ValueList.
For the Dimension you simply put this: =ValueList('State 1', 'State 2')
Then in your expressions you refer to the values by comparing as it iterates the dimension like this:
IF(ValueList('State 1', 'State 2')='State 1', Sum({'State 1'}StockAmount), Sum({'State 2'}StockAmount))
Notice that my Alternate States happen to be called State 1 and State 2 but that is just the names. You can have as many values you wish in your value list (like 3, 4, 10 alternate states).
You can also have multiple measures that refer to the valuelist as well so that you can stack the bars.
Now remember you are hereby sworn to secrecy about the ValueList function and the cool things you can do with it.
Yeah buddy.
And the best part is you get to learn a super top secret, sworn to secrecy, cool function of Qlik ... ValueList.
For the Dimension you simply put this: =ValueList('State 1', 'State 2')
Then in your expressions you refer to the values by comparing as it iterates the dimension like this:
IF(ValueList('State 1', 'State 2')='State 1', Sum({'State 1'}StockAmount), Sum({'State 2'}StockAmount))
Notice that my Alternate States happen to be called State 1 and State 2 but that is just the names. You can have as many values you wish in your value list (like 3, 4, 10 alternate states).
You can also have multiple measures that refer to the valuelist as well so that you can stack the bars.
Now remember you are hereby sworn to secrecy about the ValueList function and the cool things you can do with it.
This works perfectly, thank you. That has enhanced my dash, big time!.