Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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!
User | Count |
---|---|
22 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
26 | |
13 | |
11 | |
9 | |
6 |