March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi All,
I need a cumulative sum of size for each month from the start July 2016 to August 2018. How do I achieve this using DAX ?
Solved! Go to Solution.
@Kolumam,
Create a calendar table in Power BI Desktop following the guide in this blog, create relationship between the date field of Date table and COD field of Project table. Then change your DAX to the following, drag date field of Date table and the measure to your chart.
Running Totals = CALCULATE ( SUM ( Project[Operating Size] ), FILTER ( ALL ( 'Date' ), 'Date'[Date] <= MAX ( 'Date'[Date] ) ) )
Regards,
Lydia
Running Totals = CALCULATE ( SUM ( 'Table1'[Size(MWP)] ), ALL ( 'Table1' ), 'Table1'[COD] <= EARLIER ( 'Table1'[COD] ) )
try this, but, you need to fix the date column as I mentioned in your other thread.
Hi
Cumulative is showing wrong values. Please check below.
Can you post sample data? (copy directly from excel to here). I can test it on my system.
@Kolumam
Try this formula:
Running Totals =
CALCULATE (
SUM ( 'Table1'[Size(MWP)] ),
FILTER (
ALLEXCEPT ( 'Table1', 'Table'[COD] ),
'Table1'[COD] <= MAX ( 'Table1'[COD] )
)
)
Sorry, formula doesn't correct. Try this formula:
Running Totals =
CALCULATE (
SUM ( 'Table1'[Size(MWP)] ),
FILTER ( ALL ( 'Table1' ), 'Table1'[COD] <= MAX ( 'Table1'[COD] ) )
)
Another way could be to use INONORAFTER
Measure = VAR mymax = MAX ( Table1[COD] ) RETURN CALCULATE ( SUM ( Table1[Size(MWP)] ), ISONORAFTER ( Table1[COD], mymax, DESC ) )
Hi All,
The issue with the below bar graph is that for the months with no COD it is not taking the same number and instead it is blank.
How do I fix this ?
@Kolumam,
Create a calendar table in Power BI Desktop following the guide in this blog, create relationship between the date field of Date table and COD field of Project table. Then change your DAX to the following, drag date field of Date table and the measure to your chart.
Running Totals = CALCULATE ( SUM ( Project[Operating Size] ), FILTER ( ALL ( 'Date' ), 'Date'[Date] <= MAX ( 'Date'[Date] ) ) )
Regards,
Lydia
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
123 | |
85 | |
85 | |
70 | |
51 |
User | Count |
---|---|
205 | |
157 | |
97 | |
79 | |
69 |