Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hello,
I want to compare the totalized variables monthly for the last day of the month (i have date in the slicer) with the same month in 3 different years
EX: if i chose 31/10/2023, we shold have this :
Thanks in advance.
hi @TotoBlank ,
you can with month on the x axis and a date filter, create 4 measures to compare the sum of the variable:
1. Measure:
CurrentMontYear_Sum =
Var _SumVariable = Sum( FactTable[Column])
Var _EOMonth_CurrentYear_Sum = CALCULATE ( _SumVariable, EOMONTH( DateTable[DateColumn] , 0)
Return _EOMonth_CurrentYear_Sum
2. Measure:
prevMontYear_Sum =
Var _SumVariable = Sum( FactTable[Column])
Var _EOMonth_PrevYear_Sum = CALCULATE ( _SumVariable, EOMONTH( DATEADD( DateTable[DateColumn], -1 ,Year) , 0)
Return _EOMonth_PrevYear_Sum
Create 2 more measures changing the -1 to -2 and -3 for prev years respectfully.
Appeciate a thumbs up if this is helpful.
Hi @adudani,
Thank you for help, but it dosnt' realy work. This is the result once i create the measure with date filter :