Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hi,
I want to calculate the sum of sales 12, 24 and 36 full month back.
So today is 26 May then I want to have to sales of april and 12 back and 24 and 36 months back.
Solved! Go to Solution.
HI @Anonymous ,
You can write a measure with date function to manually filter records:
Measure = VAR currDate = MAX ( Tabe[Date] ) RETURN CALCULATE ( SUM ( Table[Amount] ), FILTER ( ALL ( Table ), [Date] >= DATE ( YEAR ( currDate ) - 1, MONTH ( currDate ), DAY ( currDate ) ) && [Date] <= currDate ) )
Notice: you can modify bold part to change cumulative month range.
Regards,
Xiaoxin Sheng
HI @Anonymous ,
You can write a measure with date function to manually filter records:
Measure = VAR currDate = MAX ( Tabe[Date] ) RETURN CALCULATE ( SUM ( Table[Amount] ), FILTER ( ALL ( Table ), [Date] >= DATE ( YEAR ( currDate ) - 1, MONTH ( currDate ), DAY ( currDate ) ) && [Date] <= currDate ) )
Notice: you can modify bold part to change cumulative month range.
Regards,
Xiaoxin Sheng
User | Count |
---|---|
84 | |
80 | |
72 | |
71 | |
55 |
User | Count |
---|---|
108 | |
106 | |
93 | |
85 | |
67 |