Forum Discussion
Help with Data Modelling and Slicers
- 5 years ago
Anonymous ,
Yeah, the duplication thing isn't good with that idea.
How about this:
Create a table with all the unique person values [opsLeadName] in, let's say it's called dimOpsLead. Keep this UNRELATED from your main table.
Use the dimOpsLead[opsLeadName] field in your slicer, then on the page/visuals you want to slice by the Ops Lead, you could use this measure as a filter:
opsLeadExists = SEARCH( SELECTEDVALUE(dimOpsLead[opsLeadName]), SELECTEDVALUE(yourTable[Ops Lead]), ,-1 )Set the filter to be [opsLeadExists] >= 1.
Pete
- 5 years ago
Anonymous ,
In Power Query, I would create a new query something like this:
let Source = Table.SelectColumns(yourTable, "Ops Lead"), #"Split Column by Delimiter" = Table.SplitColumn(Source, "Ops Lead", Splitter.SplitTextByDelimiter(" / ", QuoteStyle.Csv), {"OpsLeadTemp1", "OpsLeadTemp2"}), #"Added Custom" = Table.AddColumn(#"Split Column by Delimiter", "OpsLeadList", each {[OpsLeadTemp1], [OpsLeadTemp2]}), #"Expanded OpsLeadList" = Table.ExpandListColumn(#"Added Custom", "OpsLeadList"), #"Filtered Rows" = Table.SelectRows(#"Expanded OpsLeadList", each ([OpsLeadList] <> null)), distinctList = Table.Distinct(Table.SelectColumns(#"Filtered Rows", "OpsLeadList")) in distinctListThis will dynamically create a distinct list of all the people featured in your original [Ops Lead] field, using the same technique as my first answer (I knew it would come in useful somehow!).
Also, it looks lke you've accidentally accepted your own answer as the solution on this post, rather than mine.
Pete
Anonymous ,
In Power Query, I would create a new query something like this:
let
Source = Table.SelectColumns(yourTable, "Ops Lead"),
#"Split Column by Delimiter" = Table.SplitColumn(Source, "Ops Lead", Splitter.SplitTextByDelimiter(" / ", QuoteStyle.Csv), {"OpsLeadTemp1", "OpsLeadTemp2"}),
#"Added Custom" = Table.AddColumn(#"Split Column by Delimiter", "OpsLeadList", each {[OpsLeadTemp1], [OpsLeadTemp2]}),
#"Expanded OpsLeadList" = Table.ExpandListColumn(#"Added Custom", "OpsLeadList"),
#"Filtered Rows" = Table.SelectRows(#"Expanded OpsLeadList", each ([OpsLeadList] <> null)),
distinctList = Table.Distinct(Table.SelectColumns(#"Filtered Rows", "OpsLeadList"))
in
distinctList
This will dynamically create a distinct list of all the people featured in your original [Ops Lead] field, using the same technique as my first answer (I knew it would come in useful somehow!).
Also, it looks lke you've accidentally accepted your own answer as the solution on this post, rather than mine.
Pete
Hi BA_Pete ,
Thanks for pointing this out.
The new layout is very confusing. Will mark your solution as the correct one.
Thanks
HN