Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hello,
I am looking for a way to convert the column ClientIP from TMG database into a legible IP address, the value is in the format:
C0A8019A-ffff-0000-0000-000000000000
the first 8 characters are the ip address in hexadecimal:
C0A8019A = 192.168.1.154
C0 = 192
A8 = 168
01 = 1
9A = 154
thanks
Solved! Go to Solution.
A Power Query solution:
let HexDigits ="0123456789ABCDEF", Source = #table(type table[ClientIP = text],{{"C0A8019A-ffff-0000-0000-000000000000"}}), First8Characters = Table.AddColumn(Source, "IP Address", each Text.Start([ClientIP], 8), type text), SplittedIntoPairs = Table.TransformColumns(First8Characters, {{"IP Address", Splitter.SplitTextByRepeatedLengths(2)}}), SplittedEachPair = Table.TransformColumns(SplittedIntoPairs,{{"IP Address", each List.Transform(_, Text.ToList)}}), HexToDec = Table.TransformColumns(SplittedEachPair,{{"IP Address", each List.Transform(_, each 16*Text.PositionOf(HexDigits,_{0})+Text.PositionOf(HexDigits,_{1}))}}), PartsCombined = Table.TransformColumns(HexToDec,{{"IP Address", each Text.Combine(List.Transform(_, Text.From),"."), type text}}) in PartsCombined
A Power Query solution:
let HexDigits ="0123456789ABCDEF", Source = #table(type table[ClientIP = text],{{"C0A8019A-ffff-0000-0000-000000000000"}}), First8Characters = Table.AddColumn(Source, "IP Address", each Text.Start([ClientIP], 8), type text), SplittedIntoPairs = Table.TransformColumns(First8Characters, {{"IP Address", Splitter.SplitTextByRepeatedLengths(2)}}), SplittedEachPair = Table.TransformColumns(SplittedIntoPairs,{{"IP Address", each List.Transform(_, Text.ToList)}}), HexToDec = Table.TransformColumns(SplittedEachPair,{{"IP Address", each List.Transform(_, each 16*Text.PositionOf(HexDigits,_{0})+Text.PositionOf(HexDigits,_{1}))}}), PartsCombined = Table.TransformColumns(HexToDec,{{"IP Address", each Text.Combine(List.Transform(_, Text.From),"."), type text}}) in PartsCombined
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
61 | |
61 | |
55 | |
38 | |
27 |
User | Count |
---|---|
85 | |
60 | |
45 | |
41 | |
39 |