Skip to main content
cancel
Showing results for 
Search instead 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

Reply
Shainewells
Regular Visitor

calculating Percentages by row not using show as % of row total

Hi, 

I have data that looks like this

Unique IdentifierCountrytypeCount measure
aUKBook1
bUKCD1
cUKCD1
dUKCD1
eUKCD1
fUKBook1
gUKCD1
hUSCD1
iUSDVD1
jUSCD1
kUSCD1
lUSCD1
mUSCD1

 

In power Bi I need to put it in a table similar to the below

 

Sum of Count measureColumn Labels   
Row LabelsBookCDDVDGrand Total
UK28.6%71.4%0.0%100.0%
US0.0%83.3%16.7%100.0%
Grand Total15.4%76.9%7.7%100.0%

 

But I can't figure out how to when calculating the % in a new collumn not to calculate the % of the total rather than for a specific country. Is there a simple way to do this or will i have to create a new collumn for each country?

 

I would just use the show as % of row total however this only allows 2 DP %s and I have been told that "I hate 2 Decimal place percentage" so need them to be 1 D.P.

 

Any help would be greatly appreciated. 

1 ACCEPTED SOLUTION
LivioLanzo
Solution Sage
Solution Sage

Try adding this measure to your matrix, where Data is the name of your table

 

= DIVIDE( COUNTROWS( Data ), CALCULATE( COUNTROWS( Data ), ALL( Data[type] ) ) )

 


 


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


Proud to be a Datanaut!  

View solution in original post

2 REPLIES 2
LivioLanzo
Solution Sage
Solution Sage

Try adding this measure to your matrix, where Data is the name of your table

 

= DIVIDE( COUNTROWS( Data ), CALCULATE( COUNTROWS( Data ), ALL( Data[type] ) ) )

 


 


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


Proud to be a Datanaut!  

Thank you so much, it's greatly appreciated.

Helpful resources

Announcements
Europe Fabric Conference

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.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.