Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowGet inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.
I think this would be a relatively simple process but am unable to figure it out. I have a donut chart that shows the sum of data from the table below (sample).
ID | Office | Sales | Sales Type |
1 | NYC | 10,000 | Online |
2 | LA | 25,000 | Store |
3 | LA | 10,000 | Online |
4 | NYC | 5,000 | Store |
My donut chart shows the make up of total sales from Sales Type, and is filtered on the NYC office only.
I want to add a card visual that shows that in this filtered bar chart, 30% of sales is explained. (NYC has 30% of total sales). When I add the sales variable to the card visual and then change it to
I am trying to add a card type visual that shows that out of all sales, NYC contains 40% of total sales. Currently I am adding a card that shows sum of sales as a percentage of grand total. However, it always just shows 100%.
Solved! Go to Solution.
Hi @Anonymous ,
You can create a measure as below to get the percentage, please find the details in the attachment.
Percentage =
VAR _persales =
SUM ( 'Table'[Sales] )
VAR _allsales =
CALCULATE ( SUM ( 'Table'[Sales] ), ALL ( 'Table' ) )
RETURN
DIVIDE ( _persales, _allsales )
If the above one can't help you get the desired result, please provide more raw data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It would be helpful to find out the solution. You can refer the following links to share the required info:
How to provide sample data in the Power BI Forum
How to Get Your Question Answered Quickly
And it is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community.
How to upload PBI in Community
Best Regards
Hi @Anonymous ,
You can create a measure as below to get the percentage, please find the details in the attachment.
Percentage =
VAR _persales =
SUM ( 'Table'[Sales] )
VAR _allsales =
CALCULATE ( SUM ( 'Table'[Sales] ), ALL ( 'Table' ) )
RETURN
DIVIDE ( _persales, _allsales )
If the above one can't help you get the desired result, please provide more raw data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It would be helpful to find out the solution. You can refer the following links to share the required info:
How to provide sample data in the Power BI Forum
How to Get Your Question Answered Quickly
And it is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community.
How to upload PBI in Community
Best Regards
Hi @Anonymous,
Create a sales measure that ignores the filter context.
Total Sales = CALCULATE(SUM('Table'[Sales]),FILTER(ALL('Table'),'Table'[Sales]))
Then for percentage, you create formula that takes [_Sales]/[Total Sales]
Works for you? Mark this post as a solution if it does!
Check out this blog of mine: How to Export Telemetry Data from Azure IoT Central into Power BI
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
85 | |
70 | |
68 | |
50 | |
32 |
User | Count |
---|---|
117 | |
100 | |
73 | |
65 | |
40 |