Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to group the Ip addresses

HI all

how to group the Ip addresses with the same numbers upto 3 octets

like 192.168.1.1

     192.168.1.2

     192.168.2.1

     192.168.2.3

     192.169..1

     192.169.3.3

from the above values in a column , I would like to display a list box with the values like

     192.168.1

     192.168.2

    

Thanks

1 Solution

Accepted Solutions
sunny_talwar

I think more like this:

Mid('192.168.1.1', 1, Index('192.168.1.1', '.', 3) - 1)

or

Mid(IPAddress, 1, Index(IPAddress, '.', 3)-1) as GroupedID

View solution in original post

2 Replies
lakshmikandh
Specialist II
Specialist II

You can use mid with index

mid(IPfield,0, index(IPfield,'. ', 2) + 1)

sunny_talwar

I think more like this:

Mid('192.168.1.1', 1, Index('192.168.1.1', '.', 3) - 1)

or

Mid(IPAddress, 1, Index(IPAddress, '.', 3)-1) as GroupedID