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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
jibran
Helper II
Helper II

Find non matched values between two tables on criteria

Hi Devs,

I have tried my best to use my knowledge on DAX queries and couldn't find out the right formula.

I want to find out the vehicles that doen not match between two tables and I further want to slice them using the product attached to them.

I used the lookup to match the values between two tables but the problem is it does not show value that is not common between both.

Vehicle Lookup = LOOKUPVALUE('FW FM Vehicles'[REGISTRATIONNUMBER],'FW FM Vehicles'[REGISTRATIONNUMBER],'RYF FM Vehicles'[RegistrationNumber])

Then I used if else to find matched and not matched values.Table 2.PNGTable 4.PNG

 

I would like to find the values between two tables based on there registration number and then further slice them on the basis on there prodcut Id that is table 1 (Management Fee ID) and table 2 (RYF FW ID).
So I will have two falgs True and False. On False I want to show values that are not common on both tables.

 

Thanks for your help. 

3 REPLIES 3
v-qiuyu-msft
Community Support
Community Support

Hi @jibran,

 

If there is a active relationship between these two tables, you can create a calculated column in the table FW FM Vehicles with Related() function. If the related() function return non blank values, please return TRUE, otherwise it's FALSE. 

 

Column = IF(ISBLANK(RELATED('RYF FM Vehicles'[RegistrationNumber])),FALSE(),TRUE())

 

Best Regards,
Qiuyun Yu 

 

 

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi Qiuyun,

Thanks for your reply

If I want to further filter that show me the vehicles that are not common and there FW Fee ID to be like '3'.

I want to show vehicles that are not common and FW Fee ID = 3

 

Hi @jibran,

 

You can modify DAX for calculated column below:

 

Column = IF(ISBLANK(RELATED('RYF FM Vehicles'[RegistrationNumber])) && [FW Fee ID]=3,FALSE(),TRUE())

 

Best Regards,
Qiuyun Yu 

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.