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
Hi,
I have three main measures in my data model:
sales = DISTINCTCOUNT(Sales[Product ID])
Here find attached the Power BI model. https://drive.google.com/file/d/1izQnlhw_geZtn4bfe5T-by3BB__mbwFK/view?usp=sharing
Thank you in advance for your help!
Best,
Sara
Solved! Go to Solution.
Try this measure:
cum_conv =
VAR vCurrentMonth =
MAX ( 'Calendar'[Month Number] )
VAR vTable =
ADDCOLUMNS ( ALLSELECTED ( 'Calendar'[Month Number] ), "@conv", [conv] )
VAR vResult =
SUMX ( vTable, IF ( 'Calendar'[Month Number] <= vCurrentMonth, [@conv] ) )
RETURN
vResult
Proud to be a Super User!
I wasn't able to access the pbix via the link. This is the basic pattern for a cumulative sum:
cum_conv =
CALCULATE (
[conv],
FILTER (
ALL ( 'Calendar' ),
'Calendar'[Month Number] <= MAX ( 'Calendar'[Month Number] )
)
)
Proud to be a Super User!
Hi @DataInsights,
Thank you very much for your answer!
I tried before this formula, but for some reason, it is not working.
I also tried SUMX = (FILTER (ALL('Calendar'),'Calendar'[Month Number] <=MAX('Calendar'[Month Number]), [conv])), but I still do not obtain the desired result.
I shared the Power BI model via Drive, let me know if you can download it from there.
Best regards,
Sara
Try this measure:
cum_conv =
VAR vCurrentMonth =
MAX ( 'Calendar'[Month Number] )
VAR vTable =
ADDCOLUMNS ( ALLSELECTED ( 'Calendar'[Month Number] ), "@conv", [conv] )
VAR vResult =
SUMX ( vTable, IF ( 'Calendar'[Month Number] <= vCurrentMonth, [@conv] ) )
RETURN
vResult
Proud to be a Super User!
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 19 | |
| 13 | |
| 8 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 29 | |
| 19 | |
| 18 | |
| 11 | |
| 10 |