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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
dogburalHK82
Helper III
Helper III

lookupvalue with number or text

Hi 

I am trying to make Table 3 from Table 1 and Table 2. 

 

Since they are not completely matching, I am not quite sure how I can do a lookupvalue (or other dax).

 

dogburalHK82_0-1685503818985.png

 

Any help would be much appreciated. 

 

2 ACCEPTED SOLUTIONS

@dogburalHK82 
Please try

Table3 =
GENERATE (
    VALUES ( Table1[Item Number] ),
    SELECTCOLUMNS (
        FILTER ( Table2, CONTAINSSTRING ( Table1[Item Number], Table2[Item Number] ) ),
        "Category", Table2[Category]
    )
)

View solution in original post

@dogburalHK82 

Try

Table3 =
MAXX (
    FILTER ( Table2, CONTAINSSTRING ( Table1[Item Number], Table2[Item Number] ) ),
    Table2[Category]
)

View solution in original post

9 REPLIES 9
devanshi
Helper V
Helper V

lookupvalues=LOOKUPVALUE('table3','Table1[item number],'Table2[category])

tamerj1
Super User
Super User

Hi @dogburalHK82 

what is the name of the 2nd column of table2?

@tamerj1 

let me upload with all names in.

dogburalHK82_0-1685506298822.png

 

@dogburalHK82 
Please try

Table3 =
GENERATE (
    VALUES ( Table1[Item Number] ),
    SELECTCOLUMNS (
        FILTER ( Table2, CONTAINSSTRING ( Table1[Item Number], Table2[Item Number] ) ),
        "Category", Table2[Category]
    )
)

@tamerj1 Great thank you.

If I want to create one calculated column next to Item number column in Table 1, what should I use?

@dogburalHK82 

Try

Table3 =
MAXX (
    FILTER ( Table2, CONTAINSSTRING ( Table1[Item Number], Table2[Item Number] ) ),
    Table2[Category]
)

@tamerj1 had tried but got this error

 

dogburalHK82_0-1685515347622.png

 

@dogburalHK82 

You mentioned that you want to create a calycolumn in table1 but seems that you are creating a measure!

@tamerj1 my apologies, i tried it in the different table. It works perfect.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.