March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi, I am creating a PBI report for my work. There is a column that has multiple text rows. But I need a slicer that selects one of the data points, not the entire column. E.g., in the below table, I have solutions that are not unique. Now I need a filter that gives me unique value, e.g. The filter option shows individual values, e.g., A, B C D E F etc.
Thank you so much for your support in advance.
Solved! Go to Solution.
Create a mapping table that links each solution to the individual items.
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WclTSUTIyVYrViVZy0nEGcoyNoBwXHVcQ1xjMddVxAymEcBx1oEpNlGJjAQ==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Solution = _t, cost = _t]),
#"Split Column by Delimiter" = Table.ExpandListColumn(Table.TransformColumns(Source, {{"Solution", Splitter.SplitTextByDelimiter(",", QuoteStyle.Csv), let itemType = (type nullable text) meta [Serialized.Text = true] in type {itemType}}}), "Solution"),
#"Removed Duplicates" = Table.Distinct(#"Split Column by Delimiter", {"Solution"}),
#"Removed Columns" = Table.RemoveColumns(#"Removed Duplicates",{"cost"})
in
#"Removed Columns"
let
Source = Solutions,
#"Added Custom" = Table.AddColumn(Source, "Custom", (k)=> Table.SelectRows(Facts, each List.Contains(Text.Split([Solution],","),k[Solution]))),
#"Expanded Custom" = Table.ExpandTableColumn(#"Added Custom", "Custom", {"Solution"}, {"Match"})
in
#"Expanded Custom"
Create a mapping table that links each solution to the individual items.
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WclTSUTIyVYrViVZy0nEGcoyNoBwXHVcQ1xjMddVxAymEcBx1oEpNlGJjAQ==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Solution = _t, cost = _t]),
#"Split Column by Delimiter" = Table.ExpandListColumn(Table.TransformColumns(Source, {{"Solution", Splitter.SplitTextByDelimiter(",", QuoteStyle.Csv), let itemType = (type nullable text) meta [Serialized.Text = true] in type {itemType}}}), "Solution"),
#"Removed Duplicates" = Table.Distinct(#"Split Column by Delimiter", {"Solution"}),
#"Removed Columns" = Table.RemoveColumns(#"Removed Duplicates",{"cost"})
in
#"Removed Columns"
let
Source = Solutions,
#"Added Custom" = Table.AddColumn(Source, "Custom", (k)=> Table.SelectRows(Facts, each List.Contains(Text.Split([Solution],","),k[Solution]))),
#"Expanded Custom" = Table.ExpandTableColumn(#"Added Custom", "Custom", {"Solution"}, {"Match"})
in
#"Expanded Custom"
Thank you for your reply. Highly appreciated. Let me try the same and get back to you. For time being, i used Text filter as a work around
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
3 | |
2 | |
1 | |
1 | |
1 |