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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
mtdimaria
New Member

Trouble Comparing Columns in Different Tables

Hello,

 

I'm having trouble comparing columns that are in two different tables. In the image below, I want to compare Expected Base Loss and Base Loss. If the two numbers match, then I want Base Loss Accuracy to read Yes, if they don't then it should read No.

 

This is what I currently have in the function

Base Loss Accuracy =
var _Table1 = SELECTEDVALUE('Service'[Base Loss])
var _Table2 = SELECTEDVALUE('Valu-Rite'[Expected Base Loss])
return
IF(_Table1 = _Table2, "Yes", "No")



mtdimaria_1-1710444075362.png

 

1 REPLY 1
vicky_
Super User
Super User

Please check that your numbers aren't being summarised (e.g. SUM, AVERGE, etc). 
I suspect that your SELECTEDVALUE() is returning blanks because there might be more than 1 value for 'Service'[Base Loss] and 'Valu-Rite'[Expected Base Loss] per row.

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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