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
MarioDias
Regular Visitor

Summarize Running Total that resets as categories changes

I am trying to write a SUMMARIZE function that calculates Running Total based on a determined category:

 

Table

Category 1Category 2TotalRunning Total (goal)
AppleBasket 155
AppleBasket 21015
OrangeBasket 3

20

20
AppleBasket 42020
AppleBasket 5525

 

I can solve this using DAX + Table visual, because it resets per Category 1:

Running Total =

CALCULATE(
    SUM(Table[Total),
    FILTER(
        ALLSELECTED(Table[Category 2]),
        ISONORAFTER('Table'[Category 2], MAX('Table'[Category 2]), DESC)
    )
)

But I cannot get the same result when using SUMMARIZE as it will just repeat the totals instead of cumulating them accordingly. I need to have it in summarize to apply further filtering for another measure.

Anyone please, any idea?

Thank you!
1 ACCEPTED SOLUTION
MarioDias
Regular Visitor

Hello  everyone.

It looks like switching ALLSELECT by ALLEXCEPT solves the problem. Thanks @parry2k for all the messages.

View solution in original post

4 REPLIES 4
MarioDias
Regular Visitor

Hello  everyone.

It looks like switching ALLSELECT by ALLEXCEPT solves the problem. Thanks @parry2k for all the messages.

parry2k
Super User
Super User

@MarioDias still not sure what you are looking for? Maybe if you provide data with the expected results, it will help.



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.

parry2k
Super User
Super User

@MarioDias what is your end goal? Why do you need to summarize? Can you provide more details?



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.

Thanks for your message @parry2k 
I will used SUMMARIZE to filter rows and get a scalar value. Filters like showing categories with less than specifict totals.

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.