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
Cyrilbrd
Helper IV
Helper IV

INDEX MATCH equivalence?

I have several queries that are located on a server.
One query has a complete set of data such as:

TABLE 1

Code1Code2
12345678whatevercode1
12345679whatevercode2 
12345680whatevercode3

I would like the return the corresponding Code2 based on the existing Code1 in another table from another query.
In Excel I would use something along an INDEX MATCH to get the code.
Note, Code1 MIGHT not be unique, duplicates may exists, but Code2 would always be the same for said Code 1
Excpected result:
New query table

TABLE 2

QtyCode1ExtractedCode2
2312345678whatevercode1
34512345679whatevercode2 
1212345680whatevercode3
1 ACCEPTED SOLUTION
Idrissshatila
Super User
Super User

Hello @Cyrilbrd ,

Try this
Extracted Code 2 = LOOKUPVALUE('Table1'[Code2],'Table1'[Code1],'Table2'[Code1])

If I answered your question, please mark my post as solution so it would appeare to others, Appreciate your Kudos 👍

 

Follow me on Linkedin



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




View solution in original post

2 REPLIES 2
Idrissshatila
Super User
Super User

Hello @Cyrilbrd ,

Try this
Extracted Code 2 = LOOKUPVALUE('Table1'[Code2],'Table1'[Code1],'Table2'[Code1])

If I answered your question, please mark my post as solution so it would appeare to others, Appreciate your Kudos 👍

 

Follow me on Linkedin



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




@Idrissshatila 

Thanks

I tried a variation of the following:

CALCULATE (
    MAX ( PLM_DATA[PLM_PN] ),
    FILTER ( PLM_DATA, CONTAINSSTRING ( AP_DATA[aP_Model], PLM_DATA[PLM_Model] ) )

But the query would not load.
The proposed solution is fast to load and works.
Thanks.

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.