Let’s talk Alteryx Copilot. Join the live AMA event to connect with the Alteryx team, ask questions, and hear how others are exploring what Copilot can do. Have Copilot questions? Ask here!
Start Free Trial

Alteryx Designer Desktop Discussions

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

How to make this formula dynamic

wonka1234
10 - Fireball

Hi,

 

I have the formula:

 

Max_DIAMOND_Date:

if [c_Action_Date] <= [File_date_with_days2] then [202210]
elseif [c_Action_Date] <= [File_date_with_days2]
then [202211]
else "" endif

 

The months can shift based on my inpuits to my dataset.

 

wonka1234_0-1674496254667.png

wonka1234_1-1674496278703.png

 

wonka1234_2-1674496298358.png

wonka1234_3-1674496315087.png

 

 

Does any one have any idea on how to make this dyanmic? What is the months were just 202210? what if my columns were 202211 202212? All these are possibilities.

 

 

11 REPLIES 11
michelle_mathews
Alteryx Alumni (Retired)

Hi @wonka1234 , you could use the Dynamic Rename tool to give the column headers generic titles, then re-use it again before output to pull back in the original naming. See attached example 

 

 

Qiu
21 - Polaris
21 - Polaris

@wonka1234 
Is your date columns having any feature?

like always in accending order and in yyyymm format?

If we can identify those, then maybe there is someting we can do.

wonka1234
10 - Fireball

@Qiu 

Date columns will always be yyyymm format. However any month could  be chosen , so it is hard to find a way to not hardcode it.

Qiu
21 - Polaris
21 - Polaris

@wonka1234 
I agree it is difficult.

Maybe we can have a sort of input file, which specify the columns in the beginning of flow.

 

wonka1234
10 - Fireball

@Qiu  Yes that can work , as it is inputted at the beginning of my flow. But how to bring that into the formula in multiple lines of the formula

Qiu
21 - Polaris
21 - Polaris

@wonka1234 
Can you provide some data input?

wonka1234
10 - Fireball

@michelle_mathews 

 

Thanks michelle, but I dont know if there will be C or D or E columns shown as an input. The formula wouldnt know what to put after the "then" in the statement.

wonka1234
10 - Fireball

@Qiu 

 

Sample data:

 

N_VALUEc_Action_DateFile_date_with_daysNameValue
jon6/27/202210/13/2022202210Y
jon6/27/202210/13/2022202211 
joey6/27/202210/13/2022202210Y
joey6/27/202210/13/2022202211 
kim6/27/202210/13/2022202210Y
kim6/27/202210/13/2022202211 
lou6/27/202210/13/2022202210Y
lou6/27/202210/13/2022202211 
ren6/27/202210/13/2022202210Y
ren6/27/202210/13/2022202211 
bob6/27/202210/13/2022202210Y
bob6/27/202210/13/2022202211 
andrew6/27/202210/13/2022202210Y
andrew6/27/202210/13/2022202211 
joe6/27/202210/13/2022202210Y
joe6/27/202210/13/2022202211 
don6/27/202210/13/2022202210Y
don6/27/202210/13/2022202211 
rudy6/27/202210/13/2022202210Y
rudy6/27/202210/13/2022202211 
bobby6/27/202211/13/2022202210 
bobby6/27/202211/13/2022202211Y
drew6/27/202211/13/2022202210 
drew6/27/202211/13/2022202211Y
carlos6/27/202211/13/2022202210 
carlos6/27/202211/13/2022202211Y
pete6/27/202211/13/2022202210 
pete6/27/202211/13/2022202211Y
jamie6/27/202211/13/2022202210 
jamie6/27/202211/13/2022202211Y
justin6/27/202211/13/2022202210 
justin6/27/202211/13/2022202211Y
rich6/27/202211/13/2022202210 
rich6/27/202211/13/2022202211Y
rob6/27/202211/13/2022202210 
rob6/27/202211/13/2022202211Y
trevor6/27/202211/13/2022202210 
trevor6/27/202211/13/2022202211Y
adam6/27/202211/13/2022202210 
adam6/27/202211/13/2022202211Y
RobertOdera
13 - Pulsar

Hi, @wonka1234 

 

Is the sample you provided what the input is BEFORE any transformation?

What you're asking can be solved by inserting Generate Rows combined with Transformations so that your min-max will be adaptive.

 

Please provide the sample source as-is before making any transformations so I can take a look at first-step principles versus picking it up along the way. Sorry if I have misunderstood 😁

Labels
Top Solution Authors