Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
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 |
---|---|
12 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
24 | |
19 | |
14 | |
10 | |
7 |