Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
I am trying to create a cumulative sum measure using the following formula:
Solved! Go to Solution.
hi @ryanxngo ,
try like:
1) add a calculated column like:
MonthNO = FORMAT([Date], "YYYYMM")
2) plot a table visual with month column and a measure like:
C_Cash =
SUMX(
FILTER(
ALLSELECTED(data),
data[MonthNO]<=MAX(data[MonthNO])
),
data[Cash]
)
or
C_Cash2 =
CALCULATE(
SUM(data[Cash]),
ALLSELECTED(data),
data[MonthNO]<=MAX(data[MonthNO])
)
it worked like:
Hi ValtteriN,
Thank you so much, I thought this had worked for me but seems like there's one more issue:
I have a month columns based on Date so if I use the Month column the cumulative sum doesn't work as expected
Here is my dataset:
The formula that I used:
I hope you can help me with this as well, thanks
hi @ryanxngo ,
try like:
1) add a calculated column like:
MonthNO = FORMAT([Date], "YYYYMM")
2) plot a table visual with month column and a measure like:
C_Cash =
SUMX(
FILTER(
ALLSELECTED(data),
data[MonthNO]<=MAX(data[MonthNO])
),
data[Cash]
)
or
C_Cash2 =
CALCULATE(
SUM(data[Cash]),
ALLSELECTED(data),
data[MonthNO]<=MAX(data[MonthNO])
)
it worked like:
Hi,
Here is how to do this:
Data:
Dax:
The calculation seems to work as expected considering the test data.
I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!
My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/
Proud to be a Super User!
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
11 | |
10 | |
10 | |
9 | |
8 |
User | Count |
---|---|
17 | |
13 | |
12 | |
11 | |
8 |