Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello,
I am new with PowerBI and not familiar with DAX... I would like to do a simple calculation using the data from one column only.
The column reports on a laboratory participation to a training and on the success (or not) at this training:
0 = the lab did not participate to the training
1 = the lab participated to the training but did not pass the test
2 = the lab participated to the training and pass the test
I would like to get the proportion of lab that pass the test:
= "number of lab that participated to the training and pass the test" / "total number of lab that participated to the training")
= total number of "2" / total number of "1" + "2"
Can someone help?
Many thanks!
Solved! Go to Solution.
If you data looks like the matrix, then your results would look like the cards.
I'd do a measure for each result and then put them together to get the Pass Proportion
0 NoParticipate = CALCULATE(count(Sheet1[Lab Name]),Sheet1[Result] =0) 1 ParticipateNoPass = CALCULATE(count(Sheet1[Lab Name]),Sheet1[Result] =1) 2 ParticipatePass = CALCULATE(count(Sheet1[Lab Name]),Sheet1[Result] =2)
Pass Proportion = Divide([2 ParticipatePass],([1 ParticipateNoPass]+[2 ParticipatePass]),0)
If you data looks like the matrix, then your results would look like the cards.
I'd do a measure for each result and then put them together to get the Pass Proportion
0 NoParticipate = CALCULATE(count(Sheet1[Lab Name]),Sheet1[Result] =0) 1 ParticipateNoPass = CALCULATE(count(Sheet1[Lab Name]),Sheet1[Result] =1) 2 ParticipatePass = CALCULATE(count(Sheet1[Lab Name]),Sheet1[Result] =2)
Pass Proportion = Divide([2 ParticipatePass],([1 ParticipateNoPass]+[2 ParticipatePass]),0)
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 20 | |
| 10 | |
| 9 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 34 | |
| 31 | |
| 19 | |
| 12 | |
| 10 |