The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Dear Team;
I would like to request your support.
How can i calculate the percentage? (Dax). In case I have the tables (1srt one OR second one) below :
Thank you
Solved! Go to Solution.
@dofrancis3 , Update measure as
Proud to be a Super User! |
|
Assuming you want to calculate the percentage of cases based on Gender in the first table:
Create measures:
Total Cases = SUM('YourTableName'[Case])
Total Cases Female =
CALCULATE (
[Total Cases],
'YourTableName'[Gender] = "F"
)
Total Cases Male =
CALCULATE (
[Total Cases],
'YourTableName'[Gender] = "M"
)
Percentage Female =
DIVIDE (
[Total Cases Female],
[Total Cases],
0
)
Percentage Male =
DIVIDE (
[Total Cases Male],
[Total Cases],
0
)
💌 If this helped, a Kudos 👍 or Solution mark would be great! 🎉
Cheers,
Kedar
Connect on LinkedIn
Dear @Kedar_Pande Thank you for your replay but i would like to calculate only the percentage of total cases
@dofrancis3 , Try creating a measure like
Proud to be a Super User! |
|
Dear @bhanu_gautam Thank you but note that this is a Mesure it's not a column.
So, please how to calculate a percentage in case Total is a mesure
@dofrancis3 , Update measure as
Proud to be a Super User! |
|
User | Count |
---|---|
14 | |
11 | |
8 | |
6 | |
5 |
User | Count |
---|---|
28 | |
19 | |
13 | |
8 | |
5 |