Forum Discussion
Unlinked Calendar and DAX
- 7 months ago
JHJHJH1988 Hi!
Can you share the pbix to fix directly the measure on your data?
Try to fix the measure as:
Average Headcount Rolling 12 % change (Live) =
VAR CurrentOffset =
MAX ( dimdateselection[FiscalPeriodOffSet] )VAR WinCurr =
FILTER (
ALL ( dimdateselection ),
dimdateselection[FiscalPeriodOffSet] >= CurrentOffset - 11
&& dimdateselection[FiscalPeriodOffSet] <= CurrentOffset
)VAR CurrRolling =
AVERAGEX ( WinCurr, [Headcount between Dates (Live)] )VAR WinPrior =
FILTER (
ALL ( dimdateselection ),
dimdateselection[FiscalPeriodOffSet] >= CurrentOffset - 22
&& dimdateselection[FiscalPeriodOffSet] <= CurrentOffset - 11
)VAR PriorRolling =
AVERAGEX ( WinPrior, [Headcount between Dates (Live)] )RETURN
IF (
OR ( ISBLANK ( CurrRolling ), ISBLANK ( PriorRolling ) ),
BLANK (),
DIVIDE ( CurrRolling - PriorRolling, PriorRolling )
)BBF
💡 Did I answer your question? Mark my post as a solution!
👍 Kudos are appreciated
🔥 Proud to be a Super User!
thank you both Zanqueta and BeaBF - you both hit the nail on the head with replacing selectedvalues to MAX.