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
alisonpappas
Helper III
Helper III

percent changed based on slicer

Hi,

 

I am trying to make a % Units market share equation. I want it to change numorators but keep the same denomitor. I want to be able to select a company or multiple companies and compare it to the total and see it in a chart. For example, I have Company A sell 100 units and the total units for all the companies is 300, then I want to see 100/300, or 33.33%. If I select Company A with 100 and Company B with 50, I want to be able to see the 33.33% for Company A and 16.67% (50/300) for Company B. As of right now, my equation changes with the selected company but changes both the numorater and denomiator to reflect the selected companies. 

 

THis is what I have:
DIVIDE([Total Units], CALCULATE([Total Units], ALLSELECTED(Data[CSI Vendor])))

 

When I select say COmpany A the equation changes so it is 100/100 giving me 100% instead of 100/300 that I want. Please advise on how to create an equation where the numorator can change based on the slicer I select for 1-many companies.

1 REPLY 1
Stachu
Community Champion
Community Champion

Can you add sample tables (in format that can be copied to PowerBI) from your model with anonymised data? Like this (just copy and paste into the post window).

Column1Column2
A1
B2.5

 

You can try this measure as well

DIVIDE([Total Units], CALCULATE([Total Units], ALLSELECTED()))


Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

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.