Forum Discussion

TestDummy's avatar
TestDummy
Regular Visitor
2 years ago
Solved

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 looking for.



Behavior

4
Billing4
Change1
General1
Technology 1
  • =Table.Group(Table.FromColumns({Table.Column(PreviousStepName,"VOC Issue")&Table.Column(PreviousStepName,"VOC Issue 2")},{"VOC Issue"}),"VOC Issue",{"Count",Table.RowCount})

8 Replies

  • wdx223_Daniel's avatar
    wdx223_Daniel
    Community Champion

    =Table.Group(Table.FromColumns({Table.Column(PreviousStepName,"VOC Issue")&Table.Column(PreviousStepName,"VOC Issue 2")},{"VOC Issue"}),"VOC Issue",{"Count",Table.RowCount})

    • TestDummy's avatar
      TestDummy
      Regular Visitor

      Thanks for the response, but it still a bit new to this. Could you explain a bit? Also would this be added as "new column" or "new measure"? I tried copying it into both and got errors.

      • dufoq3's avatar
        dufoq3
        Community Champion

        Hi, wdx223_Daniel provided Power Query solution - so you should add his code as a new step in your Power Query query.