Alteryx Designer Desktop Discussions

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

how to add calculation field after cross tab out put

AnkitDwivedi6
7 - Meteor

HI team, I am looking to add new calculated column after cross tab output. Here i have 2 dates data to compare. These dates are dynamic hence i can't directly use the formula tool.

Cross tab output column: IB, Cust ID, 20201015,20201231.

 

expected calculated field: difference between underlying data in 2001015 and 20201231

IDcust ID2020101520201231calculated field

1

ABS2521=21-25
2CFH8496=96-84
3KKM2535=35-25
9 REPLIES 9
Emil_Kos
17 - Castor
17 - Castor

Hi @AnkitDwivedi6,

 

Probably there might be a better solution for this but this one definitely works

 

Emil_Kos_0-1610714507468.png

 

The output is:

Emil_Kos_1-1610714539393.png

 

 

Qiu
20 - Arcturus
20 - Arcturus

@AnkitDwivedi6 

This should help.

0115-AnkitDwivedi6.PNG

mbarone
16 - Nebula
16 - Nebula

Does it matter what the date columns that come out of the cross tab are named?  Would it be okay if they're named just "Date1" and "Date2", or something else generic like that?  If so, there's be a pretty easy solution.  

AnkitDwivedi6
7 - Meteor

Hi thanks for reply. Yes i need dates as well to infer more information from the data set.

AnkitDwivedi6
7 - Meteor

if we can name "latest date" and "previous date" that can help?

Emil_Kos
17 - Castor
17 - Castor

Hi @AnkitDwivedi6,

 

In that case, my answer should work for you.

One upside in it should work fast as I am just changing the names of the columns.

 

If you are interested in only working on 2 columns it should work perfectly.

Emil_Kos
17 - Castor
17 - Castor

Hi @AnkitDwivedi6,

 

I have reflected new column names for you:

 

Emil_Kos_0-1610717241683.png

 

mbarone
16 - Nebula
16 - Nebula

In that case I'd go with a dynamic rename:

Step 1:  Create a text input tool with the column names you'll ultimately want:

2021-01-15 08_34_49-Alteryx Designer x64 - New Workflow1_.png

 

Step 2:  Connect to cross tab output with a Dynamic Rename tool and rename as follows:
2021-01-15 08_36_44-Alteryx Designer x64 - New Workflow1_.png

 

Step 3:  Create your formula:
2021-01-15 08_37_59-Alteryx Designer x64 - New Workflow1_.png

 

AnkitDwivedi6
7 - Meteor

my data set is something like attached file and here i am looking for move between 2 days challenge is dates are dynamic..

 

Labels