Forum

Power query - Addin...
 
Notifications
Clear all

Power query - Adding a column that counts the number of rows with identical values in specified columns

3 Posts
2 Users
0 Reactions
2,859 Views
(@plasteredric)
Posts: 17
Eminent Member
Topic starter
 

I'd like to added a column onto an existing query that counts the number of rows which have that values in several columns but i'm unsure how I would go about achieving this.

I've put together a sample table of how i'd like it to output. In the sample file the Date, Time and Type column would be checked to see if they have identical values while ignoring the Ref column.

Thanks in advance.

count-1.PNG

 
Posted : 22/02/2022 12:05 pm
(@mynda)
Posts: 4761
Member Admin
 

Hi Richard,

You can use the number grouped data in Power Query technique.

Mynda

 
Posted : 23/02/2022 2:25 am
(@plasteredric)
Posts: 17
Eminent Member
Topic starter
 

Hi Mynda,

I tried your suggestion and it works well to return an incremental count within each group which will be really useful for me. 

I managed to figure out that I could also return the total count from each group by creating a custom column and using "= Table.RowCount([Count])" before expanding the tables.

Thank you very much for the help.

 
Posted : 23/02/2022 8:19 pm
Share: