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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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

Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Top Kudoed Authors