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.
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.
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
@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.
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.
@wonka1234
I agree it is difficult.
Maybe we can have a sort of input file, which specify the columns in the beginning of flow.
@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
@wonka1234
Can you provide some data input?
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.
Sample data:
N_VALUE | c_Action_Date | File_date_with_days | Name | Value |
jon | 6/27/2022 | 10/13/2022 | 202210 | Y |
jon | 6/27/2022 | 10/13/2022 | 202211 | |
joey | 6/27/2022 | 10/13/2022 | 202210 | Y |
joey | 6/27/2022 | 10/13/2022 | 202211 | |
kim | 6/27/2022 | 10/13/2022 | 202210 | Y |
kim | 6/27/2022 | 10/13/2022 | 202211 | |
lou | 6/27/2022 | 10/13/2022 | 202210 | Y |
lou | 6/27/2022 | 10/13/2022 | 202211 | |
ren | 6/27/2022 | 10/13/2022 | 202210 | Y |
ren | 6/27/2022 | 10/13/2022 | 202211 | |
bob | 6/27/2022 | 10/13/2022 | 202210 | Y |
bob | 6/27/2022 | 10/13/2022 | 202211 | |
andrew | 6/27/2022 | 10/13/2022 | 202210 | Y |
andrew | 6/27/2022 | 10/13/2022 | 202211 | |
joe | 6/27/2022 | 10/13/2022 | 202210 | Y |
joe | 6/27/2022 | 10/13/2022 | 202211 | |
don | 6/27/2022 | 10/13/2022 | 202210 | Y |
don | 6/27/2022 | 10/13/2022 | 202211 | |
rudy | 6/27/2022 | 10/13/2022 | 202210 | Y |
rudy | 6/27/2022 | 10/13/2022 | 202211 | |
bobby | 6/27/2022 | 11/13/2022 | 202210 | |
bobby | 6/27/2022 | 11/13/2022 | 202211 | Y |
drew | 6/27/2022 | 11/13/2022 | 202210 | |
drew | 6/27/2022 | 11/13/2022 | 202211 | Y |
carlos | 6/27/2022 | 11/13/2022 | 202210 | |
carlos | 6/27/2022 | 11/13/2022 | 202211 | Y |
pete | 6/27/2022 | 11/13/2022 | 202210 | |
pete | 6/27/2022 | 11/13/2022 | 202211 | Y |
jamie | 6/27/2022 | 11/13/2022 | 202210 | |
jamie | 6/27/2022 | 11/13/2022 | 202211 | Y |
justin | 6/27/2022 | 11/13/2022 | 202210 | |
justin | 6/27/2022 | 11/13/2022 | 202211 | Y |
rich | 6/27/2022 | 11/13/2022 | 202210 | |
rich | 6/27/2022 | 11/13/2022 | 202211 | Y |
rob | 6/27/2022 | 11/13/2022 | 202210 | |
rob | 6/27/2022 | 11/13/2022 | 202211 | Y |
trevor | 6/27/2022 | 11/13/2022 | 202210 | |
trevor | 6/27/2022 | 11/13/2022 | 202211 | Y |
adam | 6/27/2022 | 11/13/2022 | 202210 | |
adam | 6/27/2022 | 11/13/2022 | 202211 | Y |
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 😁
User | Count |
---|---|
106 | |
85 | |
76 | |
54 | |
40 |