Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
Check it out now!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])