Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello,
I have not been able to find an answer to this question and hope someone can help me out. Thank you.
I have the following data.
Gender Group 1 | Gender Group 2 | Gender Group 3 |
F | F | M |
F | F | M |
M | F | F |
M | F | F |
M | M | F |
I would like to create a pie chart that shows two categories "M" and "F" across three columns and the total number of males and females for each category. For example Pie chart shows M = 6 and F = 9. Is this possible in PBI? Thank you.
Thank you.
Solved! Go to Solution.
Hi,
To achieve this you can unpivot the table in Power Query Editor:
1. Highlight the 3 columns and use the 'unpivot columns' button in the 'transform' menu:
2. Add a new column called something like 'count' and add the value 1 to each row
3. Set the new column format to 'whole number'
4. You can now create a pie chart like this, setting the 'count' column as the value and the male/female column as the legend:
Hope this helps.
Jo
Hi,
To achieve this you can unpivot the table in Power Query Editor:
1. Highlight the 3 columns and use the 'unpivot columns' button in the 'transform' menu:
2. Add a new column called something like 'count' and add the value 1 to each row
3. Set the new column format to 'whole number'
4. You can now create a pie chart like this, setting the 'count' column as the value and the male/female column as the legend:
Hope this helps.
Jo
It worked. Thank you so much!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |