GroupBy Count and Numbering the appearances.

Hi there,

Maybe you guys can help with this

I wanna make the “COUNT IF CUST” Column, as you can see it counts how many times the customer name appears (in this case they make a transaction). As well as made a numbering for rows that often appears like 21(1), 21(2), and goes on.

Thanks :smiley:

Hey there,

that should be doable!

If it needs to look exactly like in your example:

  1. Group by Customer Name and count by any other column to get count by customer
  2. join original data set with group by result containing count per customer using joiner node (inner join on Customer Name columns)
  3. Group Loop (loop over customer Name)
  4. Inside loop (use column expressions to generate string - the “numbering” can be generated using rowIndex() function
  5. outside the loop remove any unwanted “helper” columns.

Prototype can be found here :-):

CustomerCount.knwf (81.5 KB)

3 Likes

What should i change in here?

delete column(“Count*(Anythingelse)”) and then select the appropriate column containing the count of customers from your data set.

Once deleted you can place the cursor before the + sign and then click on column button and select the correct column.

Thankk youu so muchh :smiley:

You are welcome!

If you could flag my post as solution that’d be much appreciated :slight_smile:

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.