Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi,
I have data that looks like this
Unique Identifier | Country | type | Count measure |
a | UK | Book | 1 |
b | UK | CD | 1 |
c | UK | CD | 1 |
d | UK | CD | 1 |
e | UK | CD | 1 |
f | UK | Book | 1 |
g | UK | CD | 1 |
h | US | CD | 1 |
i | US | DVD | 1 |
j | US | CD | 1 |
k | US | CD | 1 |
l | US | CD | 1 |
m | US | CD | 1 |
In power Bi I need to put it in a table similar to the below
Sum of Count measure | Column Labels | |||
Row Labels | Book | CD | DVD | Grand Total |
UK | 28.6% | 71.4% | 0.0% | 100.0% |
US | 0.0% | 83.3% | 16.7% | 100.0% |
Grand Total | 15.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.
Solved! Go to Solution.
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!
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.
User | Count |
---|---|
96 | |
86 | |
78 | |
72 | |
67 |
User | Count |
---|---|
110 | |
103 | |
84 | |
65 | |
62 |