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

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

Reply
OKgo
Helper IV
Helper IV

Cummulative sum visible in edit queries

Within PowerBi is there a way to have a cumulative total visible in the edit queries screen?

 

This is how I would tackle this in Excel. Sort by "unique' then by "date", simple IF formula:

PBI2.png

thank you in advance!

1 ACCEPTED SOLUTION
v-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi @OKgo,

 

To get a cumulative total column, please try:

Running total Col =
CALCULATE (
    SUM ( 'Table1'[Value] ),
    FILTER (
        ALLEXCEPT ( 'Table1', 'Table1'[unique] ),
        Table1[Date] <= EARLIER ( Table1[Date] )
    )
)

1.PNG

 

To create a running total measure, please refer to:

Running total measure =
CALCULATE (
    SUM ( Table1[Value] ),
    FILTER (
        ALLEXCEPT ( Table1, Table1[unique] ),
        Table1[Date] <= MAX ( Table1[Date] )
    )
)

2.PNG

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi @OKgo,

 

To get a cumulative total column, please try:

Running total Col =
CALCULATE (
    SUM ( 'Table1'[Value] ),
    FILTER (
        ALLEXCEPT ( 'Table1', 'Table1'[unique] ),
        Table1[Date] <= EARLIER ( Table1[Date] )
    )
)

1.PNG

 

To create a running total measure, please refer to:

Running total measure =
CALCULATE (
    SUM ( Table1[Value] ),
    FILTER (
        ALLEXCEPT ( Table1, Table1[unique] ),
        Table1[Date] <= MAX ( Table1[Date] )
    )
)

2.PNG

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Dear Yuliana, thank you so much! That was exactly the breakthough I needed. I added the column in the modelling tab and the graphs work great. Can you please explain how you got your first screenshot? It looks like a preview from the edit queries screen which looks great.

OKgo
Helper IV
Helper IV

My best atempt using

https://www.daxpatterns.com/cumulative-total/

 

However is not working. Not sure how to introduce the filter for unique....

 

Cumulative Quantity = 
CALCULATE (
    SUM ( Table1[Value] ),
    FILTER (
        ALL ( 'Calendar'[Date] ),
        'Calendar'[Date] <= MAX ( 'Calendar'[Date] )
    )

 


)

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.