Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowGet inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.
Hello everyone
I have a data of employee number by sex like the following.
sex number
female 5
male 10
male 8
I need to calculate for example: Percent of male employee number showing separately in Card visual.
In case of this how should i write DAX expression for this.
Please help me
Thank you🤗🤔
Create DAX measure
Male = CALCULATE(SUM(MyTable[number])/SUMX(ALL(MyTable),MyTable[number]),MyTable[sex]="male")
Female = CALCULATE(SUM(MyTable[number])/SUMX(ALL(MyTable),MyTable[number]),MyTable[sex]="female")
Did I answer your question? Mark my post as a solution!
Appreciate with a kudos 🙂
@Ryansong - Should be,
Percent = SUMX(FILTER(ALL('Table'),[sex]="male"),[number]) / SUMX(ALL('Table'),[number])
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
19 | |
14 | |
10 | |
10 | |
9 |
User | Count |
---|---|
15 | |
13 | |
12 | |
12 | |
11 |