Forum Discussion
Acorn999
Jan 26, 2023Brass Contributor
Unable to filter for multiple values in column
I am working in Power BI. I have Premium Capacity. Source Data is Excel. The source column has multiple values separated by semicolon. This shows my scenario from left to right: I am not...
- Jan 31, 2023
There may be a better solution but this one works for me:
Create a new table to serve as a Cross Reference with Right-click 'Reference' in Data view.
In that table, remove all columns except the ones one with multiple values and the ID column.
Split each column that has multiple values by delimiter [ comma ] into rows.
Create a new table for each column that has multiple values with Right-click 'Reference'. This creates the values for the slicer for a given column.
In the slicer values table, right-click and remove duplicates.
At this point there should be three tables:
1] the original source data table
2] the cross reference table that has the multiple values split into rows and has an ID column
3] the slicer table that has only the unique values from any one column that had multiple values, no other columns.
In Relationships,
1] Connect slicer table to cross reference table, many to one, one way, on the column name (that had multiple values).
2] Connect cross reference to source table, many to one, two way, on ID.
For the visualization, The slicer gets its values / choices from the slicer table. The graphs to show the actual data gets its values from the source table. End result is the slicer shows unique values but selection of one or more values returns all matching hits in the source table as it should.
I also changed source data to be a SharePoint list instead of Excel, however, the solution should work with an Excel data source the same way.
Acorn999
Jan 31, 2023Brass Contributor
There may be a better solution but this one works for me:
Create a new table to serve as a Cross Reference with Right-click 'Reference' in Data view.
In that table, remove all columns except the ones one with multiple values and the ID column.
Split each column that has multiple values by delimiter [ comma ] into rows.
Create a new table for each column that has multiple values with Right-click 'Reference'. This creates the values for the slicer for a given column.
In the slicer values table, right-click and remove duplicates.
At this point there should be three tables:
1] the original source data table
2] the cross reference table that has the multiple values split into rows and has an ID column
3] the slicer table that has only the unique values from any one column that had multiple values, no other columns.
In Relationships,
1] Connect slicer table to cross reference table, many to one, one way, on the column name (that had multiple values).
2] Connect cross reference to source table, many to one, two way, on ID.
For the visualization, The slicer gets its values / choices from the slicer table. The graphs to show the actual data gets its values from the source table. End result is the slicer shows unique values but selection of one or more values returns all matching hits in the source table as it should.
I also changed source data to be a SharePoint list instead of Excel, however, the solution should work with an Excel data source the same way.