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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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