Forum Discussion
melg
4 years agoFrequent Visitor
Parallel Period producing the same result as current period
Hi there, I have created the below expression to populate a line graph. This works perfectly for the current period. Gross Deals Posted = SWITCH( SELECTEDVALUE('Grouping'[Group]),...
mahoneypat
4 years agoMicrosoft Employee
Please share your [Posted Deals 13Months] measure. I suspect that is undoing what you are trying to do with the time intelligence functions.
Pat
melg
4 years agoFrequent Visitor
Hi there,
Posted Deals 13Months =
VAR
LDate = MAX(pavw_Dates[ReportingDate])
VAR
FDate = EOMONTH(LDate,-13)
VAR
Result =
IF(
MAX(FilterDates[ReportingDate]) <=
LDate &&
MIN(FilterDates[ReportingDate]) >=
FDate,
CALCULATE(
[Posted Deals],
FILTER(ALL(pavw_Dates[MonYear]),
pavw_Dates[MonYear] =
VALUES(FilterDates[MonYear])
)
)
)
RETURN
Result
The reason I did this was to be able to show 13 months on the graph, no matter what month was selected in the slicer. This date slicer is using the pavw_Dates table.
Also as part of this process, I created another date table called FilterDates:
FilterDates = pavw_Dates
This was so the graph would work correctly showing the 13 months, so in my Axis, I have the MonthYear from the FilterDates table.
I hope that makes sense.
Thanks.