Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I hope you could help me with this.
I am trying to build a Straight table that shows the weeks by columns
and i'm struggling with one thing, ex; current week is 25 and I want to build a set analysis that calculates current week minus 30 which will technically date be Nov last year,
How can I get that in the calculations, if I do current week (25) minus 30 , the week number will be -5 not week 47 from last year
hi
may be like this
if(week(today())<30,
week(today())-30+52,week(today())-30)
so for week 25 = 25-30 = -5 +52 = 47
Hi ,
Thank you for your reply. Isn't there a way to create a new column in the data that will show a sequence number as the table i'm thinking to create will be a rolling 10 months but by week
ex;
Load week_year ,
autonumber
;
so it'll be
week_year column autonumber column
week 47-2020 1
48-2020 2
etc; so when i'm building the set analysis in the table i'll just do sum({<week_year ={'1'}>}sales), then on the second column of staight table, sum({<week_year ={'1+1'}>}sales), third column, sum({<week_year ={'1+2'}>}sales) etc
may be this
autonumber(week_year, class(week_year,30)) as autonumberID
Where in class function 30 is the count of week you want to class