Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I want a filter that filters on the last couple of weeks (for example the last 5 weeks). This filter will be used on graphs that compare 2017 with 2018, So I want to compare week 2-6 of 2017 and week 2-6 of 2018 with each other. I tried to use the weeksago function but then it only shows the last 5 weeks in 2018 and not those weeks in 2017. Does anyone have a solution for this?
Thanks,
Pascal
Hi,
can you tell us more about your table structure ?
what are the Date columns you have ?
can you attach an example app? sample data ?
I have bar chart with week dimensions on the X-axis (W01, W02, W03,...) and a measure that calculates the difference between 2017 and 2018 on the Y-axis.
this Week dimension (W01, W02...) is it a derived field of a "formatted" "date field?
Yes it is
Hi,
here you can find one method to do it
=sum({<Year={'$(=Max(Year))'}, Week={">=$(=Week(today())-5)<$(=Week(today()))"}>}myRandom) ==> for last 5 weeks of N
=sum({<Year={'$(=Max(Year)-1)'}, Week={">=$(=Week(today())-5)<$(=Week(today()))"}>}myRandom) ==> for last 5 weeks of N-1
Please find attached
and with this one you have can change dynamically the numbers of the weeks
please find attached