Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
AnalyticsDev
Contributor III
Contributor III

Year over Year (YoY) and Month over Month comparison in charts

Hi,

I posted this yesterday but for some reason it was marked as spam and I dont know why.  I still need to solve this.

I have a need to do a year over year, month over month comparison in a bar/line combo chart.  The bar measure would display the difference in 'sales' numerically, and the line would show the percent change.  I have this pretty much solved, with the exception of going into the previous year.  The current year months (Jan-April) work beautifully but I cannot get the months before that to show with the measure (December through last May.)  

Im using a Master Calendar.

Expression:

aggr(sum({<CurYTDFlag = {1}, MasterYear={$(=YEAR(TODAY()))}>} CodeCount),MasterMonth)

- aggr(sum({<LastYTDFlag = {1}, MasterYear={$(=YEAR(TODAY())-1)}>} CodeCount),MasterMonth)

Example data for Year over Year:

Mar-2022     10000

Apr-2022      10000

Mar-2023      11000

Apr-2023      15000

 

Example Data for Month over Month:

Mar-2023   11000

Apr-2023    15000

The bar for April would show 4000, the difference in growth between the two months, the percent would be 36%.

A lot of searching the forums shows me how to calculate one individual month comparison but it doesnt work in a chart with all 12 months.  I still need to solve this.

Thanks in advance.

Labels (1)
0 Replies