Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
NickzNickz
Helper IV
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

EmpNoNameStatusGenderGroup Age
emp1Name 10M51 - 60
emp2Name 20F51 - 60
emp3Name 31M00 - 20
emp4Name 41M00 - 20
emp5Name 51F00 - 20
emp6Name 61M21 - 30
emp7Name 71F31 - 40
emp8Name 81F31 - 40
emp9Name 91F21 - 30
emp10Name 101M41 - 50
emp11Name 111M41 - 50
emp12Name 121M41 - 50
emp13Name 131M21 - 30
emp14Name 141M51 - 60

 

Fact : Occupations

EmpNoNameYears of ServicesGroup Years of Service
emp1Name 1501 - 05 
emp2Name 2606 - 10
emp3Name 3401 - 05 
emp4Name 4301 - 05 
emp5Name 5501 - 05 
emp6Name 6706 - 10
emp7Name 7906 - 10
emp8Name 8806 - 10
emp9Name 9501 - 05 
emp10Name 101211 - 15
emp11Name 111311 - 15
emp12Name 121411 - 15
emp13Name 13401 - 05 
emp14Name 141616 - 20

 

Dimension : Group Age

IndexGroup Age
100 - 20
221 - 30
331 - 40
441 - 50
551 - 60
661 - 70
7> 70

 

Dimension : Year of Service

IndexGroup Years of Service
101 - 05
206 - 10
311 - 15
416 - 20


and below is my visualization:
NickzNickz_4-1687230131405.png

 

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? 

 

Thank you in advance.
Regards,
NickzNickz



4 REPLIES 4
devanshi
Helper V
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 .

rbriga
Impactful Individual
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!

Hi @rbriga ,

 

I really appreciate your reply.

 

I was thinking to have like below sample:

NickzNickz_0-1687246676236.png

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

rbriga
Impactful Individual
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!

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.