Discussion board where members can learn more about Qlik Sense App Development and Usage.
I have attached a test app, which shows volume distribution for the last two years (Chart 1).
I am attempting in Chart 2 and 3 to show volume distribution for the last 52 weeks with two lines: this year and last year.
This year = last 52 weeks
Last year = The same 52 weeks, the year before.
So, the last data point in the chart is current week vs same week last year, and the entire charts contains a total of 52 data points (one for each week)
How do I do that?
Go to Solution.
use week(yourDateField) as Dimension.
otherwise you're showing 2 Measures that will only give results for the correcponding year
View solution in original post
Thanks for your help.
I actually already tried this, but wanted the current week to be the last point of the chart. If we only use week(date) then week 52 will always be the last point on the chart.
But I managed to fix it with this addition to my calendar:
Dual(Replace(WeekName($1), '/', '-'), Mod(52-(Week(Today()) - Week($1) + 1), 52)) AS [WeekL52] Tagged ('$axis', '$weekl52')
So, this will shift the weeks, so that current week becomes "week 52" and thereby the last point on the chart.