Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
Hello guys,
Someone can help me please ?
I want to cumulate NB of the last X months (in this example, I used 12 months).
Cumul = CALCULATE(SUM('12MoisGlissant'[NB]);DATESBETWEEN('12MoisGlissant'[M];'12MoisGlissant'[M-12];'12MoisGlissant'[M]))
I also tried DATESINPERIOD but I have the same results.
See below :
Thank you very much !
Have good day
Solved! Go to Solution.
I find a solution :
Cumul =
VAR MValue = '12MoisGlissant'[M]
VAR M12Value = '12MoisGlissant'[M-12]
RETURN
calculate(SUM('12MoisGlissant'[NB]);filter('12MoisGlissant';and('12MoisGlissant'[Début de mois]<=MValue;'12MoisGlissant'[Début de mois]>=M12Value)))
I tried it but doesn't work :
Mesure =
VAR MValue = SELECTEDVALUE('12MoisGlissant'[M])
VAR M12Value = SELECTEDVALUE('12MoisGlissant'[M-12])
RETURN
calculate(SUM('12MoisGlissant'[NB]);filter('12MoisGlissant';DATESBETWEEN('12MoisGlissant'[Début de mois];M12Value;MValue)))
I find a solution :
Cumul =
VAR MValue = '12MoisGlissant'[M]
VAR M12Value = '12MoisGlissant'[M-12]
RETURN
calculate(SUM('12MoisGlissant'[NB]);filter('12MoisGlissant';and('12MoisGlissant'[Début de mois]<=MValue;'12MoisGlissant'[Début de mois]>=M12Value)))
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 1 | |
| 1 | |
| 1 |
| User | Count |
|---|---|
| 4 | |
| 3 | |
| 3 | |
| 2 | |
| 2 |