Forum Discussion
Anonymous
7 years agoNot applicable
Count across columns
Hi,
I have a data like the below (first 4 columns)
In PowerQuery M, I want to add a new column called 'Agent Count' with a count of the number of agents enabled per machine.
I have looked around this community. There is a solution to use groupby, which I don't want to use as I want to retain my original data.
Please help.
Hi Anonymous
simply add a column with this formula:
List.Count(List.Select(Record.FieldValues(_), (x) => Text.Contains(x, "enabled")))
3 Replies
- ImkeFCommunity Champion
Hi Anonymous
simply add a column with this formula:
List.Count(List.Select(Record.FieldValues(_), (x) => Text.Contains(x, "enabled")))
- AnonymousNot applicable
That was much simpler than I thought. Thank you imkyu
- AnonymousNot applicable
This formulae does not seem to work in my case, which is very similar. I got all error values.