Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
sekinod
Helper II
Helper II

Conditional Measure

I have data table similar to following one 

 

mbs1.JPG

 

then using measures  in power bi I got the matrix as following

mbs2.JPG

 

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?

2 REPLIES 2
Anonymous
Not applicable

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.

amitchandak
Super User
Super User

@sekinod , you can same in power BI. Better to use Switch

https://youtu.be/gelJWktlR80

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.