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: 
balajisj30
Creator
Creator

How to include selected year and previous year in bar chart

Hi people

How to include sales values of the selected year and previous year in the same bar chart.

qlik1.PNG

Thanks

Balaji

1 Reply
OmarBenSalem
Partner - Champion II
Partner - Champion II

let's suppose that ur measure is :

sum(Measure)

and that u have a field called YearField in ur data

in ur bar chart:

as dimension : YearField

as measures:

1) sum({<YearField={"$(=max(YearField))"}>}Measure)  //this is the selected year

2) sum({<YearField={"$(=max(YearField)-1)"}>}Measure)  //this is the selected year-1