The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the June 2024 Power BI update to learn about new features.
User | Count |
---|---|
137 | |
106 | |
105 | |
73 | |
59 |
User | Count |
---|---|
266 | |
127 | |
119 | |
100 | |
88 |