Forum Discussion

SarathB2's avatar
SarathB2
Frequent Visitor
4 years ago
Solved

Need help with Dax

Hello Experts, Good Day! I am stuck with finding  and extract the values from  a column which "StartsWith" any of the value from another column which are true. Example -  I have two tables with o...
  • amitchandak's avatar
    4 years ago

    SarathB2 , Try like

     

    Flag =
    VAR SO = Table2[Object]
    VAR _Tab = maxx(FILTER(Table1, CONTAINSSTRING(LEFT(SO,LEN(Table1[Type])),Table1[Type])), Table[Type])
    RETURN
    _tab

  • Fowmy's avatar
    4 years ago

    SarathB2 

    Try the following column:

    Item = 
    VAR SO = Table2[Object]
    VAR Tab = VALUES('Table1'[Type] )
    RETURN
    IF(
        Table2[Flag],
        MAXX(
            FILTER(
                Table1,
                CONTAINSSTRING( SO , Table1[Type] )
            ),
            Table1[Type]
        )
    )