Forum Discussion

Ugarte335's avatar
Ugarte335
Copper Contributor
Nov 18, 2019
Solved

How to count multiple values in a cell

Hello,

 

This is the first time I post!

 

I need to do the following. I have a dataset and one of the fields is made up of cells that can have multiple values. For example the below. We have cells that contain zero, one or multiple names and I would need to count those names like in a pivot table. These names are separated by an "enter". In the example below I put the desired output.

 

 

 20192018
Class 1John
Mary
Mary
Joseph
Matthew
Class 2Theresa
Anthony
Matthew
Margaret
Class 3John
Theresa
Theresa
Margaret

 

Desired output:

 

 Number of Classes
Person20192018
John20
Theresa21

 

Thanks in advance!

 

  • Ugarte335 I used Powerquery to massage your data as you can see in the attached file. From the green table it'll be easy to create your pivottable report. You can also feed the result of the query into the pivottable directly without using the intermediate green table of course.

  • JKPieterse's avatar
    JKPieterse
    Silver Contributor

    Ugarte335 I used Powerquery to massage your data as you can see in the attached file. From the green table it'll be easy to create your pivottable report. You can also feed the result of the query into the pivottable directly without using the intermediate green table of course.

Resources