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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Year over Year chart

Hello All,

I have an issue to make a year over year line chart.

I have a set of data at weeks/year level that I convert into date and then I want to make a chart showing the evolution year over year in %.

I tried some set analysis as the following but I didn't figure out to get the right result.

Sum({$<Date={">$(=vStart_Chart)"}>} Volume)

/Sum({$<Date={">$(=vMinDate)"}>} Volume) -1

Where vMinDate = Min(Date)

And vStart_Chart=AddMonths(vMinDate,12)

I also tried:

Sum({$<Date={">$(=vStart_Chart)"}>} Volume)

/Sum({$<Date={$(vShift_Date)}>} Volume) -1

Where vShift_Date = =AddMonths(Date,-12)

but it doesn't work anymore.

I think my problem is that I can't figure how to shift my data by 12 month or 52 weeks.

Somebody have a solution

Thank you for your help

Jonathan

Labels (1)
2 Replies
teiswamsler
Partner - Creator III
Partner - Creator III

Hi Jonathan

Make a Master Calender in the script to control the logic behinde your year to year comparason.

Creating A Master Calendar

If it is ok, that your flags are static use script, if not use logic i set analysis see attached..

/Teis

Not applicable
Author

Thank you for your response, I will work on master calendar. But as I m working With PE edition I can't open your file, is there a solution ?

An issue that I figure out yesterday is that as I m comparing weeks vs weeks year before I can't just make minus 12 month because I set weeks date at the Sunday of the week.