Alteryx Designer Desktop Discussions

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

Put Numbering with condition

SH_94
11 - Bolide

Hi Community,

 

May i know how to write the formula in the multi-row formula tool  so that output is as per below:

 

The condition is that for the first month it will start with A whereby record ID is 1 for A , 2 for B , 3 for C and 4 for D. While for the second month onwards, it will opposite and start with D instead and so on.

Output

SH_94_0-1672120508654.png

 

Many thanks

 

15 REPLIES 15
ShankerV
17 - Castor

Hi @SH_94 .

 

Try this, I have just added the Select tool to make sure the Month field is Int32 and Type is String.

 

ShankerV_0-1672123717465.png

 

ShankerV
17 - Castor

 @SH_94 

 

The above solution will work, as Month field in your Alteryx might be considered as String.

Its version issue where I am using the higher version.

 

Please let me know if the solution works in your system.

 

Many thanks

Shanker V

SH_94
11 - Bolide

Hi @ShankerV ,

 

I still have the same output , is there anyway to build the formula so that it able to derive the result wanted?

 

 

 

Thanks

ShankerV
17 - Castor

Hi @SH_94 

 

Sure, you can build the same formula.

 

Step 1: Input the data

Step 2: Use the summarize tool to get the Max

ShankerV_0-1672125160492.png

 

Step 3: Join tool

ShankerV_1-1672125184199.png

 

 

Step 4: sort connected to J node

ShankerV_2-1672125207592.png

 

Step 5: sort connected to R node

ShankerV_3-1672125253463.png

 

Stet 6: Union tool

 

ShankerV_4-1672125313480.png

 

Finally, multirow tool

ShankerV_5-1672125336998.png

 

Result:

ShankerV_6-1672125354306.png

 

Many thanks

Shanker V

ShankerV
17 - Castor

Hi @SH_94 

 

By last chance, try this workflow attached.

Had made few tweaks, which might work for you.

 

 

 

ShankerV
17 - Castor

Hi @SH_94 

 

Did it worked? 

If yes, Please mark helpful answers as a solution so that future users with the same problem can find them more easily!!!!

 

Many thanks

Shanker V

Labels