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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
SpicyRicey
Regular Visitor

Cumulative calculations not working

Hi all,

 

Hoping someone might be able to help.

 

I'm trying to create a running total to use in a line graph but my data refuses to cumulate.  I've read numerous theards and tried to use 'Quick Measures' without any success.  I'm starting to wonder if my data table is the problem.

 

Here is a screen shot of my data table:

 

Power BI Data Table.PNG

 

I want the Client ID (Count Distinct) Column to cumulate over time based on the Outcome Date Column.  I'm currently using the following formula to calculate this without much luck:

 

Running Total Outcomes = CALCULATE([Total Hard Outcomes],FILTER(ALL('Cumulative HO Data 14-/15 - 16/17'[Outcome Date]),'Cumulative HO Data 14-/15 - 16/17'[Outcome Date] <= Max('Cumulative HO Data 14-/15 - 16/17'[Outcome Date])))

 

When I try to insert this measure into a matrix

 

Power BI Matrix example.PNG

 

Any help/advice would be greatly appreciated.

Kind regards,

1 REPLY 1
Eric_Zhang
Microsoft Employee
Microsoft Employee


@SpicyRicey wrote:

Hi all,

 

Hoping someone might be able to help.

 

I'm trying to create a running total to use in a line graph but my data refuses to cumulate.  I've read numerous theards and tried to use 'Quick Measures' without any success.  I'm starting to wonder if my data table is the problem.

 

Here is a screen shot of my data table:

 

Power BI Data Table.PNG

 

I want the Client ID (Count Distinct) Column to cumulate over time based on the Outcome Date Column.  I'm currently using the following formula to calculate this without much luck:

 

Running Total Outcomes = CALCULATE([Total Hard Outcomes],FILTER(ALL('Cumulative HO Data 14-/15 - 16/17'[Outcome Date]),'Cumulative HO Data 14-/15 - 16/17'[Outcome Date] <= Max('Cumulative HO Data 14-/15 - 16/17'[Outcome Date])))

 

When I try to insert this measure into a matrix

 

Power BI Matrix example.PNG

 

Any help/advice would be greatly appreciated.

Kind regards,


@SpicyRicey

You can try to create a measure as below.

[Running Total Outcomes ] =
SUMX (
    FILTER (
        ALL ( 'Cumulative HO Data 14-/15 - 16/17' ),
        'Cumulative HO Data 14-/15 - 16/17'[outcome date ]
            <= MAX ( 'Cumulative HO Data 14-/15 - 16/17'[outcome date ] )
    ),
    'Cumulative HO Data 14-/15 - 16/17'[client id ]
)

ddddddddddddd.png

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors