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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

MayPowerBICarousel

Power BI Monthly Update - May 2024

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.