Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Talend Cloud AWS EU Scheduled Outage: Starting Tues 26 May 21:00 CEST with expected completion Wed 27 May 01:00 CEST
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Stacked Bar Chart - Set Analysis Previous And Current Selecions in X Axis

Hi everybody,

I need to create a stacked bar chart that shows in X axis the previous and the current selections and the sum of the values of each product in Y axis. Attached are the qlikview file with my data and an example of the chart I want to create.

I also would like to know if it is possible to show the value of the selecions (Month 01, Month 02, Month 03) instead of "Previous" and "Current".

Thanks!!!

Labels (1)
1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

You can do it if you add a calculated dimension and replace both expressions with one expression. The calculated dimension you need to add is =ValueList('Previous Selection','Current Selection'). This must be the first dimension in the chart so promote it to the top spot. The single expression you need to use is this one:

    if(ValueList('Previous Selection','Current Selection')='Current Selection',

        SUM(Value),

        SUM({$1}Value)

    )

Remove any other expressions.


talk is cheap, supply exceeds demand

View solution in original post

4 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

You can do it if you add a calculated dimension and replace both expressions with one expression. The calculated dimension you need to add is =ValueList('Previous Selection','Current Selection'). This must be the first dimension in the chart so promote it to the top spot. The single expression you need to use is this one:

    if(ValueList('Previous Selection','Current Selection')='Current Selection',

        SUM(Value),

        SUM({$1}Value)

    )

Remove any other expressions.


talk is cheap, supply exceeds demand
Anonymous
Not applicable
Author

Hi

just added touch up to Gysbert suggestion.Hope this serves your requirement.

Please find the attached qvw

Not applicable
Author

Thank you very much!!! It is exactly what I need.

Not applicable
Author

Thank you very much!!! It is exactly what I need.