Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more
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])
Check out the April 2025 Power BI update to learn about new features.
Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
User | Count |
---|---|
16 | |
10 | |
8 | |
8 | |
7 |