The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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.
Hi, @alisonpappas,
try this
Share of sales = DIVIDE ( SUM ( Sales[Sales] ); CALCULATE ( SUM ( Sales[Sales] ); ALL ( Sales[Company] ) ) )
User | Count |
---|---|
26 | |
10 | |
8 | |
6 | |
6 |
User | Count |
---|---|
32 | |
14 | |
11 | |
10 | |
9 |