Reputation: 59
Hi Guys I am trying to create a table in Qlikview that shows me sales starting from current week (Week 11) and works back Week 10 Week 9 etc to week 52 previous year. I can do this by creating individual expressions but this would be extremely time consuming. I have been trying to write an expression but having no joy. Is there a way i can create these columns within the table using calculated dimension where i can write a formula, something like:
= sum({=$(=Week(today()-52))<=$(=Week(today()))"}>} QTY)
That would create each week and show the qty of sales.
Upvotes: 1
Views: 434
Reputation: 932
I would use a numeric representation in the script:
create a field in your calendar: year(date)+Num(Week(MyDate), '00') as yearweek
then you can create a variable vStartWeek
: =(max(Year)-1)&52
then your expression will be = sum({<yearweek={">=$(vStartWeek)"}>} QTY)
no need for <=Week(today())
unless you already sold something in the future ;D
Upvotes: 1