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
Anonymous
Not applicable

(First Dashboard) Calculating Percentages Against Multiple Values

 Good morning, everyone.

 

 I have created a data model and connected relationships. I have a few, very basic visuals as I try and learn Power BI, but I've hit a snag. I have multiple criteria - As and example:

 Total StaffResignations
Cleaning201
Admin50
Managers60
Auditors152
Payroll30
HR20
Helpdesk52
Security123
TOTAL688


 What I'd like to do is calculate percentages agaisnt this. I don't currently have measures that calculate the invidiaul numbers of staff per service line, this is done entierly by the visual tools, so on instinct I want to calculate 8 different measures, then divide them by another 8 measures... Which, while it would work, feels like I'm missing the point.

 

 Is there a simple way to ask the visual tools to give me a percentage of something calculated against a value that exists only in the visual tool itself?

 

 Sorry if this is unclear.

1 ACCEPTED SOLUTION
RandyPgh
Resolver III
Resolver III

The easiest visualizations for showing percentages are the 100% Stacked Bar, 100% Stacked Column, Pie, and Donut charts. Given all the partitions of a total, these can provide you with percentages. You will, however, need a third column that has Remaining Staff (Total Staff minus Resignations). Then, using a 100% bar chart with Axis of Department (Cleaning Staff, Admin, Managers, ...), you add the Resignations and the Remaining Staff into the Value field.

 

Capture.PNG

View solution in original post

4 REPLIES 4
RandyPgh
Resolver III
Resolver III

The easiest visualizations for showing percentages are the 100% Stacked Bar, 100% Stacked Column, Pie, and Donut charts. Given all the partitions of a total, these can provide you with percentages. You will, however, need a third column that has Remaining Staff (Total Staff minus Resignations). Then, using a 100% bar chart with Axis of Department (Cleaning Staff, Admin, Managers, ...), you add the Resignations and the Remaining Staff into the Value field.

 

Capture.PNG

Anonymous
Not applicable

@RandyPgh 

 

 Ohh, that's clever!

 

 Thank you very much! You wily genius!

parry2k
Super User
Super User

@Anonymous can you share what is the formula for your % calculations?



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


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.

Anonymous
Not applicable

 I sure can!  

  

 I've isolated the data in the queries, added a simple DistinctCount (Employee Number) to give me the total staff, then let the visuals do the rest of the work by letting it break down the staff by their relevant service line.  

  

 For the terminatons, I've let the visuals do ALL the work. My data includes the employee number, the service line, so I've just let the visual break them down for me.  

  

 I'm thinking, if I add a "Total Terminations" measure that is just a DistinctCount of all staff leaving, then do a simple X/Y, the visuals should resolve the rest into their subcatagories, right?  

  

 I'm sorry, I know this isn't totally clear.

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.