Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now
Hello dear community,
I hope you are ok. I need your assistance with the following. I have a bar chart that shows the ammount of people by gender and group age as shown in the image. The total ammount of people is 511 and for instance for the age group 45-49 the amount of females is 59, this is correct, this I do it by putting into the bar chart the variable GID (which is my id) and then display the count of them. However when I want to see the result as a percentage the results are not correct. Instead of showing for the given case 59/511= 11% it shows 6%. I would need maybe a measure in dax so that when I put in the x axis the age group and in the y axis the measure the % over the total is correctly displayed by gender (so in this case for instance 11% female and 9% male for the age group 45-49)
Thank you in advance!!!
Solved! Go to Solution.
Hi @nachobarr2020 ,
According to your description, here are my steps you can follow as a solution.
(1) This is my test data.
(2) We can create a measure.
Measure =
var _a= COUNT('Table'[gid])
var _b=CALCULATE(COUNT('Table'[gid]),ALL('Table'))
return DIVIDE(_a,_b,0)
(3) Then the result is as follows.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @nachobarr2020 ,
According to your description, here are my steps you can follow as a solution.
(1) This is my test data.
(2) We can create a measure.
Measure =
var _a= COUNT('Table'[gid])
var _b=CALCULATE(COUNT('Table'[gid]),ALL('Table'))
return DIVIDE(_a,_b,0)
(3) Then the result is as follows.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Check out the October 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
33 | |
16 | |
13 | |
10 | |
8 |
User | Count |
---|---|
59 | |
20 | |
12 | |
11 | |
10 |