Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
@Michael_Tarallo @mbj @petter @richbyard @Mp3Leaks @rohitk1609 @Marcus_Spitzmiller @ergustafsson @Masaki_Hamano @Sue_Macaluso
Hi Everyone,
Here I am calculating abc and abcdef
abc=sum({<week_no= {"$(=max(week_no))"}>}sale) for current week
abc=sum({<week_no= {"$(=max(week_no)-1)"}>}sale) for previous week
but for abcdef i am only able to calculate for current week if i select only one week in week filter
abcdef=Sum(TOTAL <week_no,category_1 > sale) here i want total at category_1 level as you can see in image.
pls help me to find current week and previous week for abcdef if I select multi weeks in week filter.
Thanks
Aditya
Hello,
If I get it right what you described as your problem,
abcdef_currentWeek=Sum({1<week_no= {"$(=max(week_no))"}>} TOTAL <week_no,category_1 > sale)
abcdef_previousWeek=Sum({1<week_no= {"$(=max(week_no)-1)"}>} TOTAL <week_no,category_1 > sale)
You should add "1" as set identifier for week_no because you don't want it to be affected by selection.
Hello,
If I get it right what you described as your problem,
abcdef_currentWeek=Sum({1<week_no= {"$(=max(week_no))"}>} TOTAL <week_no,category_1 > sale)
abcdef_previousWeek=Sum({1<week_no= {"$(=max(week_no)-1)"}>} TOTAL <week_no,category_1 > sale)
You should add "1" as set identifier for week_no because you don't want it to be affected by selection.
Thanks @SerhanKaraer for your reponse it is really very helpfull.
Thanks A lot
Aditya