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.
Deart Colleagues,
Could you help me with DAX mesure or calculate colums for below table please!
Region | District | Staus | Nbr_Fail | Nbr_Fail | % FAIL and PASS |
R1 | RD11 | Fail | |||
R1 | RD15 | Pass | |||
R1 | RD12 | ||||
R1 | RD13 | Pass | |||
R3 | RD38 | Fail | |||
R2 | RD21 | Pass | |||
R3 | RD36 | Pass | |||
R2 | RD22 | Fail | |||
R2 | RD23 | Pass | |||
R1 | RD16 | Fail | |||
R3 | RD31 | Pass | |||
R1 | RD14 | ||||
R3 | RD32 | Pass | |||
R3 | RD33 | Pass | |||
R3 | RD37 | Fail | |||
R3 | RD34 | Pass | |||
R3 | RD35 | Fail |
Solved! Go to Solution.
Hi @dofrancis3 ,
Your requirements are a bit vague. I don't know if my understanding is correct. Please correct me if I misunderstand your requirements.
My understanding is that you want to calculate the percentage of failures and passes.
Please try:
Create 2 measures to count the total number of fail and pass.
Total Fail = COUNTROWS(FILTER('Table', 'Table'[Staus] = "Fail"))
Total Pass = COUNTROWS(FILTER('Table', 'Table'[Staus] = "Pass"))
Create 2 measures to calculate the percentage of fail and pass.
% Fail = DIVIDE([Total Fail], [Total Fail] + [Total Pass], 0)
% Pass = DIVIDE([Total Pass], [Total Fail] + [Total Pass], 0)
The final page effect is as follows:
pbix file is attached.
If you have any further questions please feel free to contact me.
Best Regards,
Yang
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
Hi @dofrancis3 ,
Your requirements are a bit vague. I don't know if my understanding is correct. Please correct me if I misunderstand your requirements.
My understanding is that you want to calculate the percentage of failures and passes.
Please try:
Create 2 measures to count the total number of fail and pass.
Total Fail = COUNTROWS(FILTER('Table', 'Table'[Staus] = "Fail"))
Total Pass = COUNTROWS(FILTER('Table', 'Table'[Staus] = "Pass"))
Create 2 measures to calculate the percentage of fail and pass.
% Fail = DIVIDE([Total Fail], [Total Fail] + [Total Pass], 0)
% Pass = DIVIDE([Total Pass], [Total Fail] + [Total Pass], 0)
The final page effect is as follows:
pbix file is attached.
If you have any further questions please feel free to contact me.
Best Regards,
Yang
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
Please provide a more detailed explanation of what you are aiming to achieve. What have you tried and where are you stuck?
User | Count |
---|---|
15 | |
13 | |
8 | |
6 | |
6 |
User | Count |
---|---|
27 | |
19 | |
13 | |
9 | |
5 |