0

I would like to customize a table so that it counts the number of times a person's name (or ID since it's unique) appears on the list e.g.

ID    Name     Dept              Dept  Name  Count
111   John     41                41    John  2
111   John     41                      Peter 1
113   Sarah    55                Total:      3
113   Sarah    55                
201   Peter    41                49    Mike  2
251   Jack     55                Total:      2
341   Mike     49                
341   Mike     49                55    Sarah 2
                                       Jack  1
                                 Total:      3

The list on the left is how it is currently displayed but want to format the table so that it looks like the list on the left where it sort via dept, count the number of times the users appears on the list on the left and have a total per dept.

Can I do this in a DataTable or can I only format it into excel. Which would work better?

JohnWayne
  • 105
  • 11
  • Refer : https://stackoverflow.com/questions/32826352/use-data-table-to-count-and-aggregate-a-column?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa – Ananda R May 15 '18 at 09:19
  • If you do it in Excel, then you will have to write your own algorithm to create the formatting as you desire. So it is better, if it could be done inside the DataTable itself. ----- Note: I am working as Developer Evangelist at Aspose – shakeel May 16 '18 at 13:56

0 Answers0