Forum Discussion
TestDummy
2 years agoRegular Visitor
Counting values in multiple columns
I am needing help on how to get the count or total of each different category value from both the "VOC Issue" and "VOC Issue 2" combined. Below is my data and then an example of the results I'm looki...
- 2 years ago
=Table.Group(Table.FromColumns({Table.Column(PreviousStepName,"VOC Issue")&Table.Column(PreviousStepName,"VOC Issue 2")},{"VOC Issue"}),"VOC Issue",{"Count",Table.RowCount})
dufoq3
2 years agoCommunity Champion
Hi, wdx223_Daniel provided Power Query solution - so you should add his code as a new step in your Power Query query.
mahenkj2
2 years agoSolution Sage
=Table.Group(Table.FromColumns({Table.Column(PreviousStepName,"VOC Issue")&Table.Column(PreviousStepName,"VOC Issue 2")},{"VOC Issue"}),"VOC Issue",{"Count",Table.RowCount})The above provided code has PreviousStepName two times, you have to replace both with last step of your query. Just start writing name of last step of your existing query, like in attached image below, started writing changed Type and it will auto detect the name in proper format, select that for both the instances.
Hope it helps.