Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I need to make some set analysis to show the last 2 weeks of data only.
I have made in the calendar a Cumulative week function and when i use the following i get the correct return
=sum({<
[%_CumWeekNo] = {"$(=max(%_CumWeekNo)-2)"}
>}[Ticket Qty])
I have tried the follwing:
=sum({<
[%_CumWeekNo] => {"$(=max(%_CumWeekNo)-2)"}
>}[Ticket Qty])
and also
=sum({<
[%_CumWeekNo] => {"$(=max(%_CumWeekNo)-2)"}..[%_CumWeekNo] => {"$(=max(%_CumWeekNo))"}
>}[Ticket Qty])
PLease can anyone assist in me achieving 2 weeks of data using the %_CumWeekNo.
Thank you in advance
try this
sum({<[Date]={">=$(=Weekstart(WeekName(max([Date]),-2)))<=$(=Weekend(WeekName(max([Date]))))"}>}[Ticket Qty)
try this
sum({<[Date]={">=$(=Weekstart(WeekName(max([Date]),-2)))<=$(=Weekend(WeekName(max([Date]))))"}>}[Ticket Qty)
Thank you for the response,
Should i be replacing the WeekName with my value %_CumWeekNo?
Before i start to replace value i see an error in the syntax, please can you advise where the issue is:
Thanks for your help.
Daniel
just change your date field..........instead of "date"
Thank you Chanty4U,
I have replaced the data and see below the date is returning a value but i cannot workout where the syntax is wrong to not show the [Send Date] as a dimension:
Are you able to assist? thanks
Daniel
you missed ] at the end of Qty
sum({<[Date]={">=$(=Weekstart(WeekName(max([Date]),-2)))<=$(=Weekend(WeekName(max([Date]))))"}>}[Ticket Qty])
Thank you so much,
I copied the original which didnt have the ] but i should have noticed,
Really appreciate your time and effort on helping me with this,