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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
CP000
New Member

Running Total with multiple items

Dear Community, 

 

I think I have a more complex Running Total challenge.

I have my information arranged by Date, Type and Value. I need to create a monthly running total by date and type.

 

In my business case, I want to show an accumulated chart that's why I need this Running Total.

 
 

Example P BI.PNG

 

Do you know how can this be possible?

Thank you. 

 

1 ACCEPTED SOLUTION
TomMartens
Super User
Super User

Hey @CP000 ,

 

i'm not sure what you mean by running total by date and type. If you select tpye either by slicer, axis label, or row/column header this DAX creates a cumulative value based on type, even if type is not mentioned inside the formula by itself:

 

running total test = 
CALCULATE(
    SUM('Fact Sale'[Quantity])
    , FILTER(
        ALL('Fact Sale'[Invoice Date Key])
        , 'Fact Sale'[Invoice Date Key] <= MAX('Fact Sale'[Invoice Date Key])
    )
)

 

Here is a little screen shot:

image.png

If this does not provide what you are looking for, please give a more detailed explanation what makes the type column special.

 

Regards,

Tom

 



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

View solution in original post

3 REPLIES 3
TomMartens
Super User
Super User

Hey @CP000 ,

 

i'm not sure what you mean by running total by date and type. If you select tpye either by slicer, axis label, or row/column header this DAX creates a cumulative value based on type, even if type is not mentioned inside the formula by itself:

 

running total test = 
CALCULATE(
    SUM('Fact Sale'[Quantity])
    , FILTER(
        ALL('Fact Sale'[Invoice Date Key])
        , 'Fact Sale'[Invoice Date Key] <= MAX('Fact Sale'[Invoice Date Key])
    )
)

 

Here is a little screen shot:

image.png

If this does not provide what you are looking for, please give a more detailed explanation what makes the type column special.

 

Regards,

Tom

 



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Thank you Tom, can you show me your table in your query editor? 

 

What I mean with Date and Type is:

1/1/2020 1 Budget Target 12,500

2/1/2020 1 Budget Target 25,000

3/1/2020 1 Budget Target 32.500

... and so on.

You see, my table gets complex beacuse I have differente types of data with different values: 1 Budget Target; 2 Forecast; 3 Expected; 4 Actual

 

Hey @CP000 ,

 

if adjust my measure to your table name and column name, it's sufficient to use the date column as axis, the measure as value and the type column as legend, this will create 4 lines.

 

If this is not what you are looking for, create a pbix that contains sample data, but still reflects your data model. Create a sketch how your visual should look like import the sketch to the pbix, upload the pbix to onedrive or dropbox and share the link.

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

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.