cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Frequent Visitor

DIVIDE each row with the SUM of column according to applied filters

Hi!

I am trying to make a calculation for each row of a matrix against the sum of a column according to filtered data from a slicer. I have succeeded with a global calculation with the totals of all the organizations but it is not updating  according to the slicer but my function seems to always take the total sum of all the product revenues and disregards the filter from the slicer which is supposed to be filtering the products.

This is the global one that seems to be working:

A RevMix Global = DIVIDE('Products A'[Revenue], SUM('Products A'[Revenue]))*100

Now I want to do the same but with the SUM of the filtered product revenues. How do I do this?

Kindest regards
1 ACCEPTED SOLUTION
Frequent Visitor

AH! I had pasted it into my calculated column (the global calculation is a column) so I tried it as a measure and it looks better but was calculating according to the category it is in.

BUT! I tried with removing the 'Products A' in the ALLSELECTED and now it works!! 😄

So the updated measure is:

A RevMix Selected % = DIVIDE(SUM('Products A'[Revenue]), CALCULATE(SUM('Products A'[Revenue]), ALLSELECTED()))*100

Thank you so much for your assistance!

11 REPLIES 11
Helper I

Check my Slouction

Create 2 Measures
1st : Total Sales = CALCULATE(Sum('Sheet1 (3)'[Sales]),All())

2nd : Sales % = (Sum('Sheet1 (3)'[Sales])/[Total Sales])*100

Helper I

A RevMix Selected % = CALCULATE(SUM('Products A'[Revenue]),ALLSELECTED(Table[Dimencion or Column 1 ]))/
CALCULATE('Products A'[Revenue]), ALL(Table)) *100

Helper I

pfa Test result

Super User

`A RevMix Global = DIVIDE(SUM('Products A'[Revenue]), CALCULATE(SUM('Products A'[Revenue]), ALLSELECTED('Products A')))*100`

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.

Frequent Visitor

I tried your update but it doesn't give the right calculations:

The slicer is based on another table for organizers but they have a relationship. Could that be something to go on?

Super User

@LadyLizzy that might be the issue, can you share the relationship between tables.

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.

Frequent Visitor

It's a bit sensitive data, is it enough to see this one?

The Organizers.Name value is the slicer

Super User

@LadyLizzy can you share what measure you added? It suppose to be working as expected.

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.

Frequent Visitor

AH! I had pasted it into my calculated column (the global calculation is a column) so I tried it as a measure and it looks better but was calculating according to the category it is in.

BUT! I tried with removing the 'Products A' in the ALLSELECTED and now it works!! 😄

So the updated measure is:

A RevMix Selected % = DIVIDE(SUM('Products A'[Revenue]), CALCULATE(SUM('Products A'[Revenue]), ALLSELECTED()))*100

Thank you so much for your assistance!

Regular Visitor

Thank you very much ❤️

This was really helpful for me.

Now my financial report looks quite good 🙂

Super User

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.

Announcements

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Monthly Update - June 2024

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

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

Top Solution Authors
Top Kudoed Authors