Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

How to filter/slice for multiple string values from one string list

Hi all - not exactly sure how to frame this question but will try my best: I am trying to create a slicer that allows the user to select an industry and then it will filter out the table for that in...
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi Anonymous ,

     

    You might consider the second method that lbendlin mentioned.

    suppose we have:

    Table1:

    Table2:

    relationship:

    Please new a measure like:

    Filter = 
    VAR _industries = SELECTEDVALUE('Table1'[Column1])
    VAR _filter = SEARCH(_industries,MAX('Table2'[Subtopic/industry]),,BLANK())
    RETURN
    _filter

    and use it as table visuals filter like this:

    Best Regards,
    Gao

    Community Support Team

     

    If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

    How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

  • Anonymous's avatar
    Anonymous
    3 years ago

    Thanks Gao - I copied your formula and attempted to make a replica but it does not seem to filter anything. 

     

    Filter = 
    VAR _industry = SELECTEDVALUE('Industry'[Column1])
    VAR _filter = SEARCH(_industry,MAX('Data Assets - Exploration'[Subtopic/Industry]),,BLANK())
    return
    _filter

    I then deleted the one-to-many relationship between both tables. 

    You can see that when I select "Supply Chain" for example, it does not filter the second table. Any ideas? I also did not create a new table per se, but rather just built the table from the selected "Data Assets" table.