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 If I understand correctly is it not going to group all the aother stores under UK group from other customer groups?
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"}) - Anonymous1 year agoNot applicable
Hi Justas4478 , hello all, thank you for your prompr reply!
I'm glad to hear you found a solution and thank you for sharing it.
Please remember to accept your solution as answer.
It will do great help to those who meet the similar question in this forum.
Thanks again for your contribution.