Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

(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.

  • Anonymous's avatar
    Anonymous
    6 years ago

    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.

     

4 Replies

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

    • Anonymous's avatar
      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.

  • Anonymous's avatar
    Anonymous
    Not applicable

    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.

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Anonymous 

       

       Ohh, that's clever!

       

       Thank you very much! You wily genius!