Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

If contains then yes

Hi all,   I have a visual (table) with columns from different linked data tables in the background in my PBI file. Now I want to create a DAX that would be like this:   Look in the "Warehouse"[Li...
  • v-angzheng-msft's avatar
    5 years ago

    Hi Anonymous 

     

    You can try to create a calculate column using CONTAINSSTRINGEXACT or FIND function

     

    If contains then yes (CONTAINSSTRINGEXACT) =
    IF ( CONTAINSSTRINGEXACT ( 'Table'[Aisle_list], 'Table'[Aisle] ), "Yes", "No" )
    

     

    Or

     

    If contains then yes (Find) =
    IF (
        ISBLANK ( FIND ( 'Table'[Aisle], 'Table'[Aisle_list], 1, BLANK () ) ),
        "No",
        "Yes"
    )
    

     

    Sample data:

    Result:

    Is this the result you want? Hope this is useful to you

    Please feel free to let me know if I misunderstand your question

     

    Best Regards,
    Community Support Team _ Zeon Zheng

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.