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: 
Richard3
Contributor III
Contributor III

Timeline graph for production, compared to the previous year.

I need to have a timeline graph for example of two years with months and years where the production is seen and another line that shows me the comparison of the production against the previous year, as well as I place it in the image, this is possible in Qlik Sense ?

3 Replies
MarcoWedel

Yes, it's possible.

One solution might be:

2022-11-14 12_33_42-QlikCommunity_Thread_t5_QlikView-App-Dev_Timeline-graph-for-production-compared-.png

using these measure expressions

Sum({$<YearDiff={0}>} Sales)

Sum({$<YearDiff={1}>} Sales)


and having created an additional table that introduces a one year offset to the MonthYear values :

tabAsOfMonthYear:
LOAD Distinct
     MonthYear,
     Date(AddYears(MonthYear,IterNo()-1),'MMM YYYY') as AsOfMonthYear,
     IterNo()-1 as YearDiff
Resident tabSales
While IterNo() <= 2;

 

Richard3
Contributor III
Contributor III
Author

Sorry, I tried to replicate and it generates a single line for each value, for the sum of "Sum({$<YearDiff={0}>} Sales)" and for "Sum({$<YearDiff={1}>} Sales )", What could be that I am doing wrong?

MarcoWedel

Can you share the relevant parts of what you actually did?