cancel
Showing results for
Search instead for
Did you mean:
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!

9 REPLIES 9
Frequent Visitor

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

Frequent Visitor

pfa Test result

Super User

@LadyLizzy update your measure as below

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

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

Thank you for swift reply!

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.

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.

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!

Super User

@LadyLizzy glad you figured out, sorry I missed to point out to add as a measure instead of column. Cheers!!

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.

## Helpful resources

Announcements

#### Check it out!

Click here to read more about the June 2022 updates!

#### Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

#### Check it Out!

Mark your calendars and join us on Thursday, June 30 at 11a PDT for a great session with Ted Pattison!

#### The Power BI Community Show

Join us on June 20 at 11 am PDT when Kim Manis shares the latest on Azure Synapse analytics, the Microsoft Intelligent Data Platform, and notable Power BI Updates from Microsoft Build 2022.

Top Solution Authors
Top Kudoed Authors