Forum Discussion
Customer group split based on stores
- 1 year ago
SamWiseOwl I think I manage to find solution in M code:
Table.ReplaceValue(#"Renamed Columns1",each [Customer Group Description],each if Text.Contains([Store Name], " NI") or [Store Number] ="1378" then "Stores NI" else [Customer Group Description],Replacer.ReplaceText,{"Customer Group Description"})
SamWiseOwl I think it could work but I am not sure how it integrates with other groupings.
Here is full list of groupings:
Beause of that it might have to be M code solution.
Hi Justas4478
Could you not add this new column into the slicer.
They can then expand the Stores UK & NI and tick which they wanted.
- Justas44781 year agoPost Prodigy
SamWiseOwl If I understand correctly is it not going to group all the aother stores under UK group from other customer groups?
- SamWiseOwl1 year agoSuper User
You could inclue them in the test.
New Column =
Switch(
True()
,[Customer Group Description] <> "Stores UK & NI" --if not this,[Customer Group Description] --return original value
,ContainsString([Store Name], " NI")
,"Stores NI"
,"Stores UK"
)- Justas44781 year agoPost Prodigy
SamWiseOwl I think I manage to find solution in M code:
Table.ReplaceValue(#"Renamed Columns1",each [Customer Group Description],each if Text.Contains([Store Name], " NI") or [Store Number] ="1378" then "Stores NI" else [Customer Group Description],Replacer.ReplaceText,{"Customer Group Description"})