Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Yr/Yr Bar Graph

Hello,

I built a bar graph that shows monthly sales against that same month last year. This works perfectly when I only have one rolling month selected in my list box. However, when I select two rolling months it displays the those two months and only last years data for one ( the greater) of the two selected months.

I am using this expression to get the previsous years data:

Sum({$<RollingMonth={"$(=Date(AddMonths(Max(RollingMonth),-12),'MM/YY'))"} >} Sales)

If I use Min instead of max, it simply displays the last years data for the lesser of the two month selected. Is there a way I can set this up where it will work correctly if one month is selected ( show sales totals for selected month and selected month-yr) and will also work correctly if two months are selected (shows sales totals for both months selected and corresponding months last year) .

Any Help would be appreciated.

Thanks Much!!

1 Solution

Accepted Solutions
Not applicable
Author

Hi, if the only thing you want to change is the year, if I understand correctly, you would only change the year within you set analysis expression.Your expression probably would look like this:

Sum({$<RollingYear={"$(=max(Year) - 1)"} >} Sales)

Hope this helps you

Regards

View solution in original post

1 Reply
Not applicable
Author

Hi, if the only thing you want to change is the year, if I understand correctly, you would only change the year within you set analysis expression.Your expression probably would look like this:

Sum({$<RollingYear={"$(=max(Year) - 1)"} >} Sales)

Hope this helps you

Regards