I have a follow up request to my earlier query
If I need an apostrophe in front of each value, how would I do that
I tried - " '" & Text.Combine(Source [Name] ,"' ,") but the output I get only has an apostrophe for the first value like so 'Will', Sam', Jo',
What I need is - 'Will', 'Sam', 'Jo', - an apostrophe in front of each value
I can convert the list to a table, add the delimiters and then convert back to a list
Is there a more elegant way to do this?
Thanks
Hi @Will_Ryu
is dax an option for you? If yes please provide a sample of 4 - 5 rows showing input and exprcted output.
Hi tamerj1 Thanks for responding
I am not using DAX and would like to use M for this purpose
I understand that I could do it this way:
let
Source = #table({"Name"}, {{"Will"}, {"Sam"}, {"Jo"}, {"Roger"}, {"Tara"}}),
#"Added Custom" = Table.AddColumn(Source, "CST", each "'" &[Name] & "'"),
#"Removed Columns" = Table.RemoveColumns(#"Added Custom",{"Name"}),
output = Text.Combine(List.Distinct (#"Removed Columns" [CST]) ,",")
in
output
However, I was looking for a more elegant solution.
Thanks
User | Count |
---|---|
129 | |
61 | |
55 | |
54 | |
43 |
User | Count |
---|---|
129 | |
61 | |
57 | |
56 | |
50 |