The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event! Join us in Stockholm, Sweden from September 24-27, 2024.
2-for-1 sale on June 20 only!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hello All,
I am trying to calculate via Measure on a dashboard the % of 3 values in a column for each of my customers in our gender column. F is female, M is male, and I is undisclosed. This is what I have tried thus far... the dashboard does filter on multiple customers. So in the below we may have Google1, Google 2 so the multiple selection is needed. If all google accounts are selected via slicer Male would be 75% for just Google2 it would be 50%. etc.
Customer | Gender
|
Google 1 | M |
Google 1 | M |
Google 2 | F |
Google 2 | M |
Microsoft | I |
Microsoft | I |
Solved! Go to Solution.
Hi @Thedatadude ,
You could try below measure
Measure = CALCULATE(COUNT('Table'[Gender]))/CALCULATE(COUNT('Table'[Gender]), ALLSELECTED('Table'))
Best Regards,
Zoe Zhi
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Thedatadude ,
You could try below measure
Measure = CALCULATE(COUNT('Table'[Gender]))/CALCULATE(COUNT('Table'[Gender]), ALLSELECTED('Table'))
Best Regards,
Zoe Zhi
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
so close 🙂 just thought of allselected this morning, but you beat me to it.
not sure if this is what you're looking for, but:
% by Gender =
var result = DIVIDE (
[GenderCount],
CALCULATE (
[GenderCount],
ALL (
'Table'[Gender]
)
)
)
return result
with another measure that is:
GenderCount = COUNT('Table'[Gender])
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 |
---|---|
102 | |
97 | |
80 | |
62 | |
57 |
User | Count |
---|---|
264 | |
120 | |
115 | |
83 | |
70 |