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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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)))
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 1 |
| User | Count |
|---|---|
| 4 | |
| 4 | |
| 4 | |
| 3 | |
| 3 |