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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
susiechocolate
Frequent Visitor

How to Calculate Percentage of a Value in Column

Hello,

I have data has follows

subgroupgroupcity
1aT1

Miami

1b T1Toronto
1c T1Los Angeles
1d T1London
2aOtherNew York
2dOtherWarsaw
3aOtherGeneva
4bOtherBeirut
5aOtherCairo
1d T1Beijing
2dOtherBangalore
3dOtherNew Delhi
1b T1Manila

 

I have another mapping table for regions

USALos Angeles
USANew York
USAMiami
CanadaToronto
Middle EastBeirut
Middle EastCairo
North AsiaBeijing
South AsiaNew Delhi
South AsiaBangalore
Southern EuropeGeneva
Southern EuropeLondon
Southeast AsiaManila
Northern EuropeWarsaw

 

I want to make a table like the following

GroupCanadaUSANorth AsiaSouth AsiaNorthern EuropeSouthern EuropeSoutheast AsiaNorth Asia
Count T112100111
Count Other01021100
Total13121211
%T1100%66.7%100%0%100%50%100%100%

 

I am not sure of how to set this table up and get the counts and percentages of the T1 group. thank you

1 ACCEPTED SOLUTION

@susiechocolate 

you can try this

Measure = SWITCH(SELECTEDVALUE('Table (2)'[Column1]),"CountT1",'Table'[T1],"Count Other",'Table'[Other],"Total",'Table'[Total],"%T1",format('Table'[%T1],"0.0%"))

1.PNG





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

7 REPLIES 7
ryan_mayu
Super User
Super User

@susiechocolate 

you need to create the relationship between two tables and create measures

1.png

pls see the attachment below





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




hi  @ryan_mayu 

thank you, I've followed your method but I need to make this in the opposite direction - the regions need to be the columns and the rest the calculations are the rows. please let me know how to reverse this thanks 

@susiechocolate 

here is a workaround for you. pls see attachment below





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Hi @ryan_mayu 

Thank you very much for this. Is there a way that the percentage can show as "[value]%" instead of a decimal place please?

@susiechocolate 

you can try this

Measure = SWITCH(SELECTEDVALUE('Table (2)'[Column1]),"CountT1",'Table'[T1],"Count Other",'Table'[Other],"Total",'Table'[Total],"%T1",format('Table'[%T1],"0.0%"))

1.PNG





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




hi @ryan_mayu 

Thank you very much this is exactly what I need!

you are welcome





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors