Skip to main content

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
Welcome to Qlik Community! Check out our new navigation! FIND OUT MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Rogers2212
Contributor II
Contributor II

Qlik Chart split by Dimension

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?

1 Solution

Accepted Solutions
Dalton_Ruer
Support
Support

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. 

Dalton_Ruer_0-1620220282778.png

Now remember you are hereby sworn to secrecy about the ValueList function and the cool things you can do with it. 

 

View solution in original post

2 Replies
Dalton_Ruer
Support
Support

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. 

Dalton_Ruer_0-1620220282778.png

Now remember you are hereby sworn to secrecy about the ValueList function and the cool things you can do with it. 

 

Rogers2212
Contributor II
Contributor II
Author

This works perfectly, thank you. That has enhanced my dash, big time!.