cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Helper IV

## Get the Total and Percentage and display them next to the chart.

Hi ...

I have the below tables in my Power BI...

Fact : Profiles

 EmpNo Name Status Gender Group Age emp1 Name 1 0 M 51 - 60 emp2 Name 2 0 F 51 - 60 emp3 Name 3 1 M 00 - 20 emp4 Name 4 1 M 00 - 20 emp5 Name 5 1 F 00 - 20 emp6 Name 6 1 M 21 - 30 emp7 Name 7 1 F 31 - 40 emp8 Name 8 1 F 31 - 40 emp9 Name 9 1 F 21 - 30 emp10 Name 10 1 M 41 - 50 emp11 Name 11 1 M 41 - 50 emp12 Name 12 1 M 41 - 50 emp13 Name 13 1 M 21 - 30 emp14 Name 14 1 M 51 - 60

Fact : Occupations

 EmpNo Name Years of Services Group Years of Service emp1 Name 1 5 01 - 05 emp2 Name 2 6 06 - 10 emp3 Name 3 4 01 - 05 emp4 Name 4 3 01 - 05 emp5 Name 5 5 01 - 05 emp6 Name 6 7 06 - 10 emp7 Name 7 9 06 - 10 emp8 Name 8 8 06 - 10 emp9 Name 9 5 01 - 05 emp10 Name 10 12 11 - 15 emp11 Name 11 13 11 - 15 emp12 Name 12 14 11 - 15 emp13 Name 13 4 01 - 05 emp14 Name 14 16 16 - 20

Dimension : Group Age

 Index Group Age 1 00 - 20 2 21 - 30 3 31 - 40 4 41 - 50 5 51 - 60 6 61 - 70 7 > 70

Dimension : Year of Service

 Index Group Years of Service 1 01 - 05 2 06 - 10 3 11 - 15 4 16 - 20

and below is my visualization:

Measure Available :
1) Male Employee
2) Female Employee
3) Active Employee

My question is as below:
1) How can I get the percentage value?
2) How can I add the Total and Percentage for both and display them next to the chart?

Regards,
NickzNickz

4 REPLIES 4
Helper V

1) to get  percentage : You can create measure using divide function OR you can add % where you have created percentage measure.
2) You can show total & percentage both  as data label of visual to show them in chart .

Impactful Individual

For (2), you won't be able to do this in a bar chart.

You can add a % of grand total into the "tooltip" slot of the visual, so it will show up as a hover.

For (1), simply use the [Active Employee] measure and add the gender into the "legend" slot.

You can either:

1. Add  [Active Employee] into the "tooltip" slot, right click it and choose "show values as> % of grand total"
2. Select the visual 100% stacked bar chart and they will turn into % of total employees.
-------------------------
Data analyst by day, hockey goalie by night.
Did I help? Then please hit that "kudos" or "accept as a solution" button!
Helper IV

Hi @rbriga ,

I was thinking to have like below sample:

I add table/matrix visualization and put the percentages in there. I will also change the table format. That is the best option I can think of.

Can you assist me with how to get the measure for total and percentage values? ...

Regards,

NickzNickz

Impactful Individual

Assuming you already have the  [Active Employee] measure:

``````Active Employee %=
DIVIDE(
[Active Employee],
CALCULATE([Active Employee], ALLSELECTED('Employee Table Name')
)

``````

CALCULATE([Active Employee], ALLSELECTED('Employee Table Name') will hold the total which includes all your filters, but takes in all age categories (or any other category in 'Employee Table Name') after those filters.

-------------------------
Data analyst by day, hockey goalie by night.
Did I help? Then please hit that "kudos" or "accept as a solution" button!

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.