Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I want to compare the orders for all weeks
I have two years of data 2015 and 2016
i am unable to compare 52 week of 2015 and 8 week of 2016.
i am using this expression
=sum({<Year_UP = {$(=Max(Year_UP))},Week_UP = { $(=Max(Week_UP)-8) },Week = {"=$(=Max(Week_UP))"},Year=,Month=,Quarter=>}Orders)
Regards,
Joshua.
Hi Manish,
When user select Week_Up = 1 and Year = 2016, i want to display
46 | 1 | 2016 | 33 |
46 | 2 | 2016 | 33 |
46 | 3 | 2016 | 33 |
46 | 4 | 2016 | 33 |
Below is your expression, In which you are using Max(Week_Up)-8, Whenever Max(Week_Up) will be less than 8 it become -ve.
So you have to use either if condition or modify your expression as per your requirement.
=sum({<Year_UP = {$(=Max(Year_UP))},Week_UP = { $(=Max(Week_UP)-8) },Week = {"=$(=Max(Week_UP))"},Year=,Month=,Quarter=>}Orders)
Hi tyagishaila
How to modify the expression with if statement.
Actually your problem is not clear to me.
Plz explain in simple way.
What fields you have and what you want to get from those.
do you want to get data of 8 week back or any thing else?
I understood till now, that if you have week_up value 8 than it gives wrong result.
which week's data you need after selecting 8?
Whenever Max(Week_Up) will be less than 8 it become -ve.
so that i am unable to find the values for
week_Up =8
week_Up =7
week_Up =6
week_Up =5
week_Up =4
week_Up =3
week_Up =2
week_Up =1
so is ther any way to write expresssion like this
=if (GetFiledSelections(Week_UP)=1, sum({<Year_UP = {$(=Max(Year_UP)-1)},Week_UP = { $(=Max(Week_UP)-8) },Week = {"=$(=Max(Week_UP))"},Year_UP=,Month_UP=,Quarter_UP=>}Orders)
,if(GetFiledSelections(Week_UP)=2, sum({<Year_UP = {$(=Max(Year_UP)-1)},Week_UP = { $(=Max(Week_UP)-7) },Week = {"=$(=Max(Week_UP))"},Year=,Month=,Quarter=>}Orders)
,if(GetFiledSelections(Week_UP)=3, sum({<Year_UP = {$(=Max(Year_UP)-1)},Week_UP = { $(=Max(Week_UP)-6) },Week = {"=$(=Max(Week_UP))"},Year=,Month=,Quarter=>}Orders)
,if(GetFiledSelections(Week_UP)=4, sum({<Year_UP = {$(=Max(Year_UP)-1)},Week_UP = { $(=Max(Week_UP)-5) },Week = {"=$(=Max(Week_UP))"},Year=,Month=,Quarter=>}Orders)
,if(GetFiledSelections(Week_UP)=5, sum({<Year_UP = {$(=Max(Year_UP)-1)},Week_UP = { $(=Max(Week_UP)-4) },Week = {"=$(=Max(Week_UP))"},Year=,Month=,Quarter=>}Orders)
,if(GetFiledSelections(Week_UP)=6, sum({<Year_UP = {$(=Max(Year_UP)-1)},Week_UP = { $(=Max(Week_UP)-3) },Week = {"=$(=Max(Week_UP))"},Year=,Month=,Quarter=>}Orders)
,if(GetFiledSelections(Week_UP)=7, sum({<Year_UP = {$(=Max(Year_UP)-1)},Week_UP = { $(=Max(Week_UP)-2) },Week = {"=$(=Max(Week_UP))"},Year=,Month=,Quarter=>}Orders)
,if(GetFiledSelections(Week_UP)=8, sum({<Year_UP = {$(=Max(Year_UP)-1)},Week_UP = { $(=Max(Week_UP)-1) },Week = {"=$(=Max(Week_UP))"},Year=,Month=,Quarter=>}Orders)
,sum({<Year_UP = {$(=Max(Year_UP))},Week_UP = { $(=Max(Week_UP)-8) },Week = {"=$(=Max(Week_UP))"},Year=,Month=,Quarter=>}Orders))
)))))))
instead of writing 8,7,6,5,4......you can use variable in single expression
in above if condition you are again using same thing Max(Week_Up)-8 if Week_Up =1
as I understood, you need to back 8 weeks,
if(
Max(Week_Up)<=8, Year_Up=Max(Year_Up)-1 and Week_Up = 52 - (8 - Max(Week_Up)
)
Hi
I modified
if(
Max(Week_Up)<=8,
Sum({< Year_UP ={$(=Max(Year_UP)-1)}, Week_UP = {"52 - (8 - Max(Week_Up)"} >}Orders),
sum({<Year_UP = {$(=Max(Year_UP))},Week_UP = { $(=Max(Week_UP)-8) },Week = {"=$(=Max(Week_UP))"}>}Orders)
)
still i am not getting the answer
Hi ,
is there any other way to modify it
if(
Max(Week_Up)<=8,
Sum({< Year_UP ={$(=Max(Year_UP)-1)}, Week_UP = {"52 - (8 - Max(Week_Up)"} >}Orders),
sum({<Year_UP = {$(=Max(Year_UP))},Week_UP = { $(=Max(Week_UP)-8) },Week = {"=$(=Max(Week_UP))"}>}Orders)
)
Regards,
Joshua.
Thank u Manish.