PDA

View Full Version : PQ - IP C class generator



sandy666
10-22-2020, 05:16 AM
let
TFR = Table.FromRecords({[IP = "192.168"]}),
num1 = Table.AddColumn(TFR, "num1", each {0..255}),
num2 = Table.AddColumn(num1, "num2", each {0..255}),
Expand1 = Table.ExpandListColumn(num2, "num1"),
Expand2 = Table.ExpandListColumn(Expand1, "num2"),
TCC = Table.CombineColumns(Table.TransformColumnTypes(Ex pand2, {{"num1", type text}, {"num2", type text}}, "en-GB"),{"IP", "num1", "num2"},Combiner.CombineTextByDelimiter(".", QuoteStyle.None),"Result")
in
TCC

Result

192.168.0.0

192.168.0.1

192.168.0.2

192.168.0.3

192.168.0.4

192.168.0.5

192.168.0.6

192.168.0.7

192.168.0.8

192.168.0.9

192.168.0.10

192.168.0.11

192.168.0.12

192.168.0.13

192.168.0.14

192.168.0.15

and so on

192.168.255.246

192.168.255.247

192.168.255.248

192.168.255.249

192.168.255.250

192.168.255.251

192.168.255.252

192.168.255.253

192.168.255.254

192.168.255.255