Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Generate multiple rows by ascending order of in between missing data for I.P Range

vizbiz
6 - Meteoroid

Hi,

I need help with a formula or the best approach to generate the ascending order of I.P address in between a range separated by "-" symbol.

Note, some data may need up to 2 decimal point ascending order range.

Attached is the sample data.

Column
12.234.455.234
89.345.235.2
98.937.234.4 - 98.937.235.8
10.234.235.6 - 10.234.235.9
10.235.657.7

Thanks

12 REPLIES 12
ponraj
13 - Pulsar

are these  IPv4 addresses ?

vizbiz
6 - Meteoroid

YES dummy

ponraj
13 - Pulsar

decimal number should be below 255 in that case.  Correct  me if I am wrong 

vizbiz
6 - Meteoroid

Yes correct, basically logic should be 255.255.255.255 so the formula should be written in such a way that the I.P range with . deliminator look of last and then when it becomes = then no need to add new row if not keep adding a new row until 255 once reached 255 it should increment the next decimal to 255 or equal and keep generating new rows of full I.P's

JohnJPS
15 - Aurora

Just FYI you have bad data in your sample: 455, 345, 937... .shouldn't be allowed.

JohnJPS
15 - Aurora

Seems like an R thing and because I'm lazy, I asked StackOverflow to help: https://stackoverflow.com/questions/51992620/r-generate-sequence-of-ip-numbers/

 

Based on that, I was able to generate the attached workflow, which should do the trick.  You will need to install the iptools R package.

 

scrnshot.png

vizbiz
6 - Meteoroid

Thank you John for the solution, unfortunately I don't have IP tools R package. Is there any other solution way without using R and stilla cheive the same result.

Appreciate your help.

danrh
13 - Pulsar

Check out the solution provided here. This was the same question and I built an IP address generator macro. There are two versions of the macro, so scroll to the bottom to get the correct one.

vizbiz
6 - Meteoroid

Hi Pulsar,

 

Thank you for the updated Macro, it is working but with below 2 errors, I don't know where I am doing wrong. Please help me.

 

10.250.129.4-10.250.129.9    ----- this example range is working as expected

10.250.127.12-10.250.128.0  ----- this range is also working but 10.250.128.0  is not getting created as a separate row in IP1 output

 

And when I incorporate the macro in my workflow, it is running with results but with warning /error message saying (Iteration #1: Tool #11: The value did not change after the loop Expression) I am using the default Macro Configuration form the original sample Macro.

 

Thanks in advance.

 

 

 

Labels