How to count a group of items

Hello everyone! I consider myself an expert and tested user of EasyMorph :slight_smile: but I have difficulty understanding and doing one thing.
I have never understood how to count repetitions of a certain size with the tools available.
I attach an example dataset:

As you can see, I have a column obtained using the Running total tool, with "Target Column": Id, "Mode": Count and "Group Column": Id...
I would expect that for each row of id, it would give me the count that I see above in the filters... instead I get a sort of Rank... Suggestions?

Hi
I'm not 100% sure I understand what you want to achieve. Are you trying to count the number of times a value appears in the column "Id"? Or do you want to add up column "c" grouped by column "Id"?

Either way, you can do this with the Aggregate action in EasyMorph.

Regards
Matt

1 Like

Hi mattf,
for example I would like that - for example - the first "Value" of Id that you see in the filter at the top, in my dataset appears in all its rows with the count "c" to 3 and not 1, 2, 3 depending on the record that I encounter first...

Ah, I think I understand now. You want to replace the value in column "c" with the maximum value for the same Id?

If so, you can do it as follows:


Firstly, derive a table from your input table and add an aggregation action to get the max "c" grouped by "Id". Then derive another table from the input table, and use the lookup action to map it in the max value. I've left the original "c" column and the new max one but you can drop and rename the columns as needed.

Regards
Matt

Alternatively, you can use the "Totals/subtotals" action. It creates a column with totals or group subtotals.

Thanks to both of you for your cooperation, I find that both methods can help me solve the problem in an excellent way! :slight_smile:

1 Like

Glad you got it working!