Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys
I have a calculation that aggregates numbers in a filed and allows selection between MTD, YTD, WTD and Custom Periods. I need to use it with Alternate States as well. I've tried this:
(the field is called GGR)
Pick($(vPeriodPicker)
//MTD
,Sum({[State A]<Year=
,Month=
,Day=
,Week=
,[Week day] =
,Date={">=$(=MonthStart(vMaxDate))<=$(vMaxDate)"}>}
GGR)
//YTD
,Sum({[State A]<Year=
,Month=
,Day=
,Week=
,[Week day] =
,Date={">=$(=YearStart(vMaxDate))<=$(vMaxDate)"}>}
GGR)
//Custom
,Sum({[State A]<Year=
,Month=
,Day=
,Week=
,[Week day] =
,Date={">=$(vMinDate)<=$(vMaxDate)"}>}
GGR)
//WTD
,Sum({[State A]<Year=
,Month=
,Day=
,Week=
,[Week day] =
,Date={">=$(=WeekStart(vMaxDate))<=$(vMaxDate)"}>}
GGR)
)
(the same calculation exist for State B)
the calculation works for every other selection i do (selecting between regions, products, etc.) except when selecting different time periods. I'll appreciate any help or guidance
Thank you
Ettiene
Which state do you have your variables in (vMaxDate and vMinDate)? Are those stored as Max({[StateA]} Date) or Max(Date)? If it is not stored as Max({[StateA]} Date)... it will probably be driven based on selection in inherited state
Thank you, that was the problem.
So is this resolved now? or are you still seeking help?
Awesome 🙂