Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin 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.
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.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 3 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 11 | |
| 9 | |
| 8 | |
| 7 | |
| 6 |