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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
NidhiBhusari
Helper IV
Helper IV

Calculating category wise % using Total

Hello,

Can anyone guide on how to calculate category wise % contribution using total.

Ex - I have age group, no of voters and on selection from slicer of particular age group % of voters in selected age category should get displayed.

Age GroupNo of Voters
21-30100000
31-40345000
41-50545000
51-657500000
66-80200000
2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@NidhiBhusari , based on what I got so far , a measure like

divide(sum(Table[No of Voters]), calculate(sum(Table[No of Voters]), allselected(Table)))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

v-angzheng-msft
Community Support
Community Support

Hi, @NidhiBhusari 

 

Try to create a measure like this:

Measure = 
var _total=CALCULATE(SUM('Table'[No of Voters]),ALL('Table'))
var _r=CALCULATE(SUM('Table'[No of Voters]))
return DIVIDE(_r,_total)

Result:

vangzhengmsft_0-1628492655677.png

Please refer to the attachment below for details

 

 

Hope this helps.

 

Best Regards,
Community Support Team _ Zeon Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-angzheng-msft
Community Support
Community Support

Hi, @NidhiBhusari 

 

Try to create a measure like this:

Measure = 
var _total=CALCULATE(SUM('Table'[No of Voters]),ALL('Table'))
var _r=CALCULATE(SUM('Table'[No of Voters]))
return DIVIDE(_r,_total)

Result:

vangzhengmsft_0-1628492655677.png

Please refer to the attachment below for details

 

 

Hope this helps.

 

Best Regards,
Community Support Team _ Zeon Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@NidhiBhusari , based on what I got so far , a measure like

divide(sum(Table[No of Voters]), calculate(sum(Table[No of Voters]), allselected(Table)))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors