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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
alisonpappas
Helper III
Helper III

Percent to change by slicer

Hi,

 

I have data where I have the units sold for different companies. I want to be able to take the total units and divide them by each company to get a percent for each company's unit sold and per period.

 

Example: 

Company A: 100 units sold

Company B: 200 Units Sold

Company C: 500 units sold

Company 😧 150 Units Sold

Company E: 50 Units Sold

Total Sold: 1000 units

 

If I were to select in a slicer just Company A, I want to see in a bar chart 100/1000. Then if I selected both Company A and B, 100/1000 in one bar and 200/1000 on another bar. So basically I want the denomiator to be the total units (can be changed based on the period) and the numorator to be the total units that can be changed by company and period.

1 REPLY 1
sturlaws
Resident Rockstar
Resident Rockstar

Hi, @alisonpappas,

 

try this

Share of sales =
DIVIDE (
    SUM ( Sales[Sales] );
    CALCULATE ( SUM ( Sales[Sales] ); ALL ( Sales[Company] ) )
)

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.