Forum Discussion

Thomas_MedOne's avatar
Thomas_MedOne
Helper III
8 months ago
Solved

Create Slicer that does a 'like' match on table

I have this data of Facilities. And they want to filter on Facility Type. However, the way the data is stored in the DB it's simply values selected separated by semicolons. So, this is the unique val...
  • Anand24's avatar
    8 months ago

    Hi Thomas_MedOne,

    Solution 1:
    - Create a new column in this new table with concatenation of Facility Type and Search On. It will bascially be facilitytypesvalue column from your 1st snapshot.

    - Join your original table (facilitytypesvalue) to this new table (new column similar to facilitytypesvalue).

    - In the slicer, pull Facility Type and enable search (see below) for the slicer.


    Solution 2:

    - Instead of creating a new table, create new columns in the same table with Facility Type and Search On.

    - In the slicer, pull Facility Type and enable search for the slicer.

     

     

    Give a Thumbs Up if this post helped you in any way and Mark This Post as Solution if it solved your query !!!

    Proud To Be a Super User !!!
    LinkedIn

  • nielsvdc's avatar
    8 months ago

    Hi Thomas_MedOne, I'm just guessing by the description you gave us, that you have a table of facilities, that has a column with facility type values? Maybe something like in the example below, which I created in Power Query.

    If this is the case, what you could do in Power Query is create new query by referencing the Facilities query. Then the following steps:

    1. Remove all columns except the FacilityId and FacilityTypeValues column.
    2. Split the FacilityTypeValues column by the semicolon delimiter
    3. Select the FacilityId column and unpivot the other columns
    4. Remove the attribute column
    5. Then you see the result below, where you see the FacilityId which each type it has assigned

    Then you can create a mapping table and merge it with this table.

    Now create a relationship between this table and the Facilities table and you use a slicer with the FacilityType field to easily select the facility type and filter the facilites. Check the attached sample pbix.

     

    facilities_sample.pbix 

     

    Hope this helps. If so, please give kudos 👍 and mark as Accepted Solution ✔️ to help others.