Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
I have data table similar to following one
then using measures in power bi I got the matrix as following
I want to give marks to branches using measure, considering Grade and Measure values
similar to this
=IF(Branch="A",IF(Measure1>0.25,0,IF(Measure2>0.2,5,IF(Measure1>0.15,10,IF(Measure1>0.1,20,30)))),IF(Branch="B",IF(Measure1>0.2,0,IF(Measure1>0.15,5,IF(Measure1>0.1,10,IF(Measure1>0.07,20,30)))),IF(Measure1>0.15,0,IF(Measure1>0.1,5,IF(Measure1>0.07,10,IF(Measure1>0.05,20,30))))))+IF((Measure1-Measure2)>0,-(ROUND((Measure1-Measure2)/0.005,0)),0)
I can do this in excel but how can I do this in Power BI?
Instead of IF use SWITCH. Your Measure1 and Measure2 are SUM( Table[value 1] ) and SUM( Table[value 2] ), respectively. Tha branch must be retrieved from the current filter context via SELECTEDVALUE. ROUND is just... ROUND.
Please use the links above to familiarize yourself with how the functions work. You'll also find examples of usage on the pages.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 7 | |
| 6 | |
| 5 | |
| 5 |
| User | Count |
|---|---|
| 24 | |
| 11 | |
| 9 | |
| 9 | |
| 8 |