Alteryx Designer Desktop Discussions

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

Create an Array of x rows and apply an if to the array

DS80845
7 - Meteor

Hi there

 

Below what I'm trying to achieve:

 

1)I have a higher and lower number

S2 H e.g. 4110899

S2 L e.g. 4110000

 

2)The above two numbers represent a range from  4110000 to 4110899

the variable let's call it "asize"=S2 H - S2L which equals to: 4110899 - 4110000=899

 

3) I want to create an array of 899 rows which includes {4110000 (1st row in the array), 4110001.....4110898 (last row in the array)}

 

4) Finally I want to check if a specific number let's say 4110050 is within the created array, if true return 1 or "TRUE". In the example above this will return "TRUE".

 

Hope the above is clear enough. Please let me know if you require more details.

 

*Attached an Input/Output file

 

Thanks in advance for your help

Regards,

Damiano

 

 

4 REPLIES 4
ChrisTX
15 - Aurora

Can you provide sample input data, and desired output?

 

You'll likely need to use the Generate Rows tool.

 

Chris

DS80845
7 - Meteor

Hi Chris

 

I've added the input output in my original post.

 

Thanks for your help

Regards,

Damiano

neilgallen
12 - Quasar

see attached example. The generate rows tool creates a record for every value between your two limits. Then you join to a different input with your target number. If the "J" anchor has any records, then your condition is true.

 

You could make this a bit more interactive with messaging tools or even as an analytic app where the user can identify the limits and target numbers, etc.

DS80845
7 - Meteor

Thanks Neil

 

That's very helpful.

 

Do you know whether is possible to do something similar using characters rather than numbers?

 

Regards,

Damiano 

Labels