Forum Discussion
gemcityzach
1 year agoHelper IV
Can PowerQuery Determine How Many Concatenations are in a field?
Hey there, I have a data set where a few of the fields contain concatenated values. The values get that way because form fields will allow the user to select multiple inputs. The field is pipe delimi...
- 1 year ago
Hi gemcityzach ,
are you looking for something like this?
#"Added Conditional Column" = Table.AddColumn( #"previous step", "Concat_1_count", each Text.Length(Text.Select([Concat1], "|")) + 1, type number ), #"Added Conditional Column1" = Table.AddColumn( #"Added Conditional Column", "Concat_1_concat?", each if [Concat_1_count] > 1 then "TRUE" else "FALSE", type logical
AMeyersen
1 year agoResolver III
Hi gemcityzach ,
are you looking for something like this?
#"Added Conditional Column" = Table.AddColumn(
#"previous step",
"Concat_1_count",
each Text.Length(Text.Select([Concat1], "|")) + 1,
type number
),
#"Added Conditional Column1" = Table.AddColumn(
#"Added Conditional Column",
"Concat_1_concat?",
each if [Concat_1_count] > 1 then "TRUE" else "FALSE",
type logical
gemcityzach
1 year agoHelper IV
That's more or less what I ended up doing. For the detect pipes I used a text.contain and then to count pipes I did exactly what you suggest and added +1 to account for the starting index value that is almost always there.