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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
Anonymous
Not applicable

running total

pbi community.PNG

I am having issues creating a running total on the field "Count Charged off loans" with the output the way it is in the green column. (the running total resets when the tier field changes). Please i need help

2 ACCEPTED SOLUTIONS

use this measure 

 

RT = CALCULATE( SUM( Table1[Count Charged off Loans] ), 
FILTER( ALLEXCEPT( Table1, Table1[Tier] ), Table1[Loan Life] <= MAX( Table1[Loan Life] ) ))


Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

@Anonymous,

You can also use the following DAX to calculate the measure.

Expected result = 
    CALCULATE (
        SUM ( Table1[Count Charged off Loans] ),
        FILTER (
            ALL ( Table1 ),
            Table1[Loan Life] <=MAX(Table1[Loan Life])
        ),VALUES(Table1[Tier])
    )



Regards,
Lydia

Community Support Team _ Lydia Zhang
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

9 REPLIES 9
Anonymous
Not applicable

TierCount Booked LoansLoan LifeCount Charged off LoansExpected Result
623000
623911
6231723
6231914
6232015
6232116
62322410
62325212
823000
823211
8231634
82322610

 

I actually want it as a calculated measure

@Anonymous,

You can also use the following DAX to calculate the measure.

Expected result = 
    CALCULATE (
        SUM ( Table1[Count Charged off Loans] ),
        FILTER (
            ALL ( Table1 ),
            Table1[Loan Life] <=MAX(Table1[Loan Life])
        ),VALUES(Table1[Tier])
    )



Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
AkhilAshok
Solution Sage
Solution Sage

You can create a calculated column like this:

Count Charged off loans RT =
VAR CurrentTier = Table[Tier]
VAR CurrentLoanLife = Table[Loan Life]
RETURN
    CALCULATE (
        SUM ( Table[Count Charged off Loans] ),
        FILTER (
            ALL ( Table ),
            Table[Tier] = CurrentTier
                && Table[Loan Life] <= CurrentLoanLife
        )
    )
Anonymous
Not applicable

I would like it as a measure and not a calculated column cos the end game is to use it on a graph

use this measure 

 

RT = CALCULATE( SUM( Table1[Count Charged off Loans] ), 
FILTER( ALLEXCEPT( Table1, Table1[Tier] ), Table1[Loan Life] <= MAX( Table1[Loan Life] ) ))


Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

Thanks for the response. This works, but the moment i drop a slicer on the report it works in a weird manner. Any suggestions please?

 

@Anonymous,

What field do you use to create a slicer? What result would you like to get by using slicer?

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

I fixed it already, Thank you so much 

LivioLanzo
Solution Sage
Solution Sage

Hi @Anonymous

 

could you post a dataset which can be copied/pasted? Also do you want to do this in a measure or calculated column?

 


 


Did I answer your question correctly? Mark my answer as a solution!


Proud to be a Datanaut!  

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 NL Carousel

Fabric Community Update - February 2025

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