Forum Discussion

fhfon's avatar
fhfon
Regular Visitor
4 years ago
Solved

Lookupvalue between tables with partial text

Hello all,

 

I need a help with the situation below.

 

I have two table:

 

Table1:

Part numberDescriptionStatus
1252BearingCritical
993FilterNon critical

 

Table2:

DescriptionStatus
Bearing 3cm stainless steel 
Exhaust HEPA Filter 

 

What I need is kind a "lookupvalue" with partial text that will bring the status from the table1 to table2, but the issue is that description in table2 has more information.

 

Please, HELP me!  🙂

 

Att.

Fernando Nobre

  • fhfon , Try a new column in Table2 like

     

    Maxx(filter(Table1, search(Table1[Description], Table2[Description],,0) >0 ), Table1[Status])

  • fhfon's avatar
    fhfon
    4 years ago

    Thank you!

     

    This worked as I wanted.

4 Replies

  • fhfon , Try a new column in Table2 like

     

    Maxx(filter(Table1, search(Table1[Description], Table2[Description],,0) >0 ), Table1[Status])

    • fhfon's avatar
      fhfon
      Regular Visitor

      Thank you!

       

      This worked as I wanted.

  • smpa01's avatar
    smpa01
    Community Champion

    fhfon  you can write a measure like this

    Measure =
    MAXX (
        FILTER (
            CROSSJOIN (
                VALUES ( 'Table 2'[Description] ),
                SELECTCOLUMNS (
                    SUMMARIZE ( 'Table 1', 'Table 1'[Description], 'Table 1'[Status] ),
                    "_description", [Description],
                    "status", [Status]
                )
            ),
            CONTAINSSTRING ( [Description], [_description] )
        ),
        [status]
    )
    

     

     

    • fhfon's avatar
      fhfon
      Regular Visitor

      Thanks! But I could not make this work.