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
abedaarabi
Regular Visitor

power bi compare 2 tables

Hi 🙂 
i have 2 tables and, i would like to check if table 1 (Type_Sorting) == (CCSClassCode_Type) is matched with table 2 (_Type Sorting) == (_CCS Class Type):

for example, you can see vi got the wrong value in table 1 (CCSClassCode_Type) and, the right value is XLB as you can see in table 2 (_CCS Class Type) not ULM, the idea of table 2 to check if people type the right values, Please not that table 2 (_CCS Class Type) have duplicate values

thank you in advance 🙂

 

Capture.PNG

5 REPLIES 5
abedaarabi
Regular Visitor

Hi @v-kelly-msft 
thank you for replying, I would like to inform you that table (2) _CCS Class Type is not unique vales, because multiple values from the table (2) _Type Sorting it could meet the same value in the table (2) _CCS Class Type, so that's why I can't make a relation table (1) and table (2)

Hi @abedaarabi ,

 

Is your issue solved?Does my suggestion work ?

Best Regards,
Kelly

Did I answer your question? Mark my post as a solution!

Hi @abedaarabi ,

 

How about a many-many relationship?

Screenshot 2020-11-05 141630.png

 

Best Regards,
Kelly

Did I answer your question? Mark my post as a solution!

v-kelly-msft
Community Support
Community Support

Hi  @abedaarabi ,

 

Create a measure as below:

Measure = 
VAR _lookupvalue=LOOKUPVALUE('Table (2)'[_CCS Class Type],'Table (2)'[_Type Sorting],MAX('Table'[Type_sorting ]),0)
Return
IF(_lookupvalue<>0,1,0)

And you will see:

Screenshot 2020-11-04 151229.png

For the related .pbix file,pls see attached.

 

Best Regards,
Kelly

Did I answer your question? Mark my post as a solution!

Fowmy
Super User
Super User

@abedaarabi 

Merge Queries in Power Query should help you solve the issue.

________________________

If my answer was helpful, please consider Accept it as the solution to help the other members find it

Click on the Thumbs-Up icon if you like this reply 🙂

YouTube  LinkedIn

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Helpful resources

Announcements
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.