Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
I have a field text field called "Committee" that denotes a committee number for each record. A record can have more than one committee number associated with it, which is separated by commas, i.e., below:
Record ID | Committee
1 | 1, 2, 4
2 | 1
3 | 3, 4, 12
I want to create a slicer that will return the records with a selected committee number, which ranges from 1 to 32. Using the example data above, a selected slicer value of "1" would return records 1 and 2, but not 3. What's the simplest way to do this?
Thanks.
Solved! Go to Solution.
Unless there is a good reason for storing the data that way, I think you should use Power Query to split the Committee column into rows.
Use 'Split column'-> by delimiter (a comma) and choose 'Into rows' from the advanced section.
That will get you a more 'relational' table. You can then use Committee in a slicer
Hi TimQ,
Yes, you could refer to above suggestions to modift table structure like below(use below M query in edit queries)
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSUTLUMdIxUYrViVYyAvHALGMgy1jHRMfQSCk2FgA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [ID = _t, Committee = _t]), #"Split Column by Delimiter" = Table.SplitColumn(Source, "Committee", Splitter.SplitTextByDelimiter(",", QuoteStyle.Csv), {"Committee.1", "Committee.2", "Committee.3"}), #"Unpivoted Columns" = Table.UnpivotOtherColumns(#"Split Column by Delimiter", {"ID"}, "Attribute", "Value"), #"Removed Columns" = Table.RemoveColumns(#"Unpivoted Columns",{"Attribute"}), #"Renamed Columns" = Table.RenameColumns(#"Removed Columns",{{"Value", "slicer"}}), #"Changed Type" = Table.TransformColumnTypes(#"Renamed Columns",{{"slicer", Int64.Type}}) in #"Changed Type"
Then you could use slicer field in Slicer, when you choose 1, it show ID, 1 AND 2 in table
Best Regards,
Zoe Zhi
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Unless there is a good reason for storing the data that way, I think you should use Power Query to split the Committee column into rows.
Use 'Split column'-> by delimiter (a comma) and choose 'Into rows' from the advanced section.
That will get you a more 'relational' table. You can then use Committee in a slicer
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
97 | |
69 | |
46 | |
39 | |
33 |
User | Count |
---|---|
163 | |
110 | |
61 | |
51 | |
40 |