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.
Hi,
I am trying to find the % of male and Female from the total headcount. This is a formula for Male. I created same formula for female.
and I get correct value.
The problem happens if I click on "female" somewhere on the page then due to formula, it still keeps 8,489 for male in internal memory as I think Filter in the formula takes precedence and divides 8,489/12,680 and gives me 67% which is clearly wrong. How do I create DAX properly in this situation?
The number card comes correct because I put a filter in filter pan as "male" for gender.
Thanks in advance,
RK
Solved! Go to Solution.
Hi,
Try this measure
Male headcount = calculate([headcount],filter(values(HC[Gender_text]),HC[Gender_text]="Male"))
% male = divide([Male headcount],[headcount])
Hope this helps.
Hi,
Try this measure
Male headcount = calculate([headcount],filter(values(HC[Gender_text]),HC[Gender_text]="Male"))
% male = divide([Male headcount],[headcount])
Hope this helps.
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 |
---|---|
103 | |
101 | |
76 | |
66 | |
60 |
User | Count |
---|---|
142 | |
106 | |
103 | |
85 | |
70 |