Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I am strugling with the following:
I need need the sales of last year, lower then the max week and lower then the current week.
Something like:
sum({$ <Year={$(=max(Year)-1)},Week = {"<$(=week(Today()))"} and Week = {"<$(=max(Week))"} >} Sales )
but this does not work.
Any suggestions?
Hi,
Try this
=sum({$ <Year={$(=max(Year)-1)}, Week = {"<$(=week(Today()))"} * {"<$(=max(Week))"} >} Sales )
Hope this helps you.
Regards,
Jagan.
Try this, "and" is replaced by comma ....
sum({$ <Year={$(=max(Year)-1)},Week = {"<$(=week(Today()))","<$(=max(Week))"} >} Sales )
hope it helps
This wil give me the total sales of last year as no week has been selected
Try this,
sum({$ <Year={$(=max(Year)-1)},Week = {"<$(=week(Today()))<$(=max(Week))"} >} Sales )
Regards,
Kaushik Solanki
At this point try to use a workaround (I don't know how your data are organized):
With a variable compute max between max(week) and week(today()) then use that only variable in set analysis
This results in 0.
Hi,
Its because you may be be having the relevant data.
Kindly upload your QVW file.
Regards,
Kaushik Solanki
I have been able to solve the problem with an if-statement, but I am sure there must be a better solution:
if(GetSelectedCount(Week)>0, sum({$ <Year={$(=max(Year)-1)},Week = {"<=$(=max(Week))"} >} Sales),sum({$ <Year={$(=max(Year)-1)},Week = {"<=$(=week(today()))"} >} Sales))
Hi,
You can replace this using below expression.
sum({$ <Year={$(=max(Year)-1)},Week = {"<=$(=if(GetSelectedCount(Week)>0,max(Week),week(today())))"} >} Sales)
Regards,
Kaushik Solanki
Hi,
Try this
=sum({$ <Year={$(=max(Year)-1)}, Week = {"<$(=week(Today()))"} * {"<$(=max(Week))"} >} Sales )
Hope this helps you.
Regards,
Jagan.