ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
解決済み

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

vizbiz
メテオロイド

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件の返信12
ponraj
パルサー

are these  IPv4 addresses ?

vizbiz
メテオロイド

YES dummy

ponraj
パルサー

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

vizbiz
メテオロイド

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
オーロラ

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

JohnJPS
オーロラ

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
メテオロイド

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
パルサー

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
メテオロイド

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.

 

 

 

ラベル
トップのソリューション投稿者