Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Checking the diffrences and puting a necasary comment

Emil_Kos
17 - Castor
17 - Castor

Hi community,

 

I wanted to ask you for help. My data will have 2 lines for each ID with a unique name and I will need to dynamically check which column has changed(for the same ID) and create a new column with a comment section. 

 

If the column will change we need to use below mapping table to identify which comment add this comment to my output. I can add only one comment so I need to choose the one with the highest priority. 

 

Column with DifferenceCommentPriority
Trade DateTrade Date1
ProductPD2
PricePricing3
CostCost4

 

The truth is I have 16 different comments that I can put so I want to make this dynamic instead of using the formula. 

 

This is the initial input file:

 

IdTrade DateProductPriceCost
ID 101.01.2020ABC123222
ID 101.01.2020XYZ123222
ID 201.01.2020ABC111123
ID 201.05.2020ABC111123

 

This is the output:

 

IdTrade DateProductPriceCostComment
ID 101.01.2020ABC123222PD
ID 101.01.2020XYZ123222PD
ID 201.01.2020ABC111123Trade Date
ID 201.05.2020ABC111123Trade Date
ID 301.06.2020ACD122132Trade Date
ID 301.08.2020WRE424787Trade Date

 

Any ideas what would be the best approach for this problem? 

5 REPLIES 5
ImadZidan
12 - Quasar

Hello @Emil_Kos ,

 

Will this help you at all?

 

One thing I should say. It will be useful to put some sort of order whether adding the time to the data or some sort of indication to the correct order of the records.

 

 

Emil_Kos
17 - Castor
17 - Castor

Hi @ImadZidan,

 

Thank you very much for that workflow but I need something different.

 

There is one issue. I have 16 columns like this so I would need to create a formula for each of them. 

 

I was wondering if I can do it more dynamically.

 

 

ImadZidan
12 - Quasar

@Emil_Kos ,

 

Oh I see. 

 

Lets give it a whirl. I am sure there is.

ImadZidan
12 - Quasar

Hello @Emil_Kos ,

 

This is more dynamic I guess.

 

Give it a close look.

 

Let us know if no good.

 

 

Emil_Kos
17 - Castor
17 - Castor

HI @ImadZidan,

 

I think this is very useful. I can work with that 🙂 

Labels
Top Solution Authors