Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
cmcgo3
Helper II
Helper II

Need Cumulative Measure

I am trying to create a new measure that will calculate a cumulative total in either a table or matrix as well as give correct total in a card.  In the attached pbix file the cumulative total for this small dataset should be 3. My verification counter measure has variables.  I understand that the below measure works under normal circumstances but its not calculating accurately.  Any help is appreciated!

 

Cumulative =
CALCULATE([Verification counter],
     FILTER(ALL('Table1'[Day of Week ]),
        'Table1'[Day of Week ] <= MAX('Table1'[Day of Week ])
     )
)

 

 

Cumulative.pbix 

2 ACCEPTED SOLUTIONS
RossEdwards
Solution Sage
Solution Sage

Give this a try:

Cumulative = var endDate = MAX('Table1'[Day of Week ])
RETURN
CALCULATE(
	[Verification counter],
	ALL('Table1'[Day of Week ]),
	'Table1'[Day of Week ] <= endDate
)

View solution in original post

THANK YOU BOTH!  This works perfectly!!!  What a great resource this platform is!!

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi, @cmcgo3 

Thanks for @RossEdwards  reply. You can refer to the following dax to solve the problem.

vyaningymsft_0-1719543955173.png

Cumulative = 
VAR _table =
    SUMMARIZE (
        'Table1',
        'Table1'[Day of Week ],
        "Verification counter", [Verification counter]
    )
RETURN
    SUMX ( _table, [Verification counter] )


CumulativeVerificationCounter = 
CALCULATE (
    [Cumulative],
    FILTER ( ALL ( Table1 ), Table1[Day of Week ] <= MAX ( Table1[Day of Week ] ) )
)

 

Best Regards,
Yang

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know.
Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

 

THANK YOU BOTH!  This works perfectly!!!  What a great resource this platform is!!

RossEdwards
Solution Sage
Solution Sage

Give this a try:

Cumulative = var endDate = MAX('Table1'[Day of Week ])
RETURN
CALCULATE(
	[Verification counter],
	ALL('Table1'[Day of Week ]),
	'Table1'[Day of Week ] <= endDate
)

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.