Customer Profile

How can I create a workflow that creates unique customers based on certain criteria that is easily referenced later on? I have found that the groupby node is like a bandaid solution.

Here is what I am trying to do:

Company | Amount($) | State | Order Number
JetsRUs | $200 | Ohio | 100
JetsRUs | $300 | Florida | 101
Planes.com | $333 | NY | 102
JetsRUs | $105 | Ohio | 103
Planes.com | $600 | NY | 104

Here is what I want it to look like:

Company | Amount($) | State | Order Number | Customer Number
JetsRUs | $200 | Ohio | 100 | 1
JetsRUs | $300 | Florida | 101 | 2
Planes.com | $333 | NY | 102 | 3
JetsRUs | $105 | Ohio | 103 | 1
Planes.com | $333 | NY | 104 | 3

Welcome to the forum, @AColvin6.

How can I create a workflow that creates unique customers based on certain criteria that is easily referenced later on?

What exactly are the criteria? I can’t really see how you go from the starting data to the desired output.

Hi @AColvin6 and welcome to the Knime Community.

I agree with @elsamuel , the criteria are not defined. However, based on the data you provided, I am assuming that a unique Customer is defined by Company+State.

I put something together quickly based on that assumption.

This is what the workflow looks like:
image

Input (same as yours):
image

Generated Customer Number, based on uniqueness of Company+State:
image

Results (same as what you have):
image

Here’s the workflow: Customer Profile.knwf (13.3 KB)

4 Likes

Hello @AColvin6,

you can also use Rank node where your criteria columns are ranking attributes and ranking mode is Dense.

Welcome to KNIME Community!

Br,
Ivan

1 Like

Hi @bruno29a - this is exactly what I needed! Thank you.

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