Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Best way to filter multiple IP addresses

I have a large set of data that has a column containing computer IP addresses.  These addresses are across a large number of IP ranges.  I want to filter out a combination of ranges found within the large set of range. 

 

For example I have IP's in the range of 192.168.0.0-192.168.100.100

 

I want to filter out smaller subset of ranges and individual IP's from this large range e.g. filter out :

 

192.168.10.0-192.168.10.254

192.168.30.0-192.168.30.254

192.168.82.0-192.168.82.100

192.168.61.1

192.168.75.10

etc...

 

What the best way to do this?  Can I create a "group" add the ranges and the indivdal IPs and filter using the "group"?

 

PS im a total PowerBI noob so go easy please.  Thanks.

1 ACCEPTED SOLUTION
V-pazhen-msft
Community Support
Community Support

@Anonymous 

Check attached pbix for detail.

 

You can split the IP column into 2 parts, the fix 192.169 and then end IP strings, and change it to decimal type to filter. 

Vpazhenmsft_0-1629945634912.png

Vpazhenmsft_1-1629945758432.png

 

If you want to create separate table, you can just use if function on the IP2 column to split the IP in different tables. For example: 

ip 10. = CALCULATETABLE(SUMMARIZE('Table',[IP]),FILTER('Table',[IP2]>=10.000 && [IP2]<=10.254))

Vpazhenmsft_3-1629945939889.png

 

 

Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
V-pazhen-msft
Community Support
Community Support

@Anonymous 

Check attached pbix for detail.

 

You can split the IP column into 2 parts, the fix 192.169 and then end IP strings, and change it to decimal type to filter. 

Vpazhenmsft_0-1629945634912.png

Vpazhenmsft_1-1629945758432.png

 

If you want to create separate table, you can just use if function on the IP2 column to split the IP in different tables. For example: 

ip 10. = CALCULATETABLE(SUMMARIZE('Table',[IP]),FILTER('Table',[IP2]>=10.000 && [IP2]<=10.254))

Vpazhenmsft_3-1629945939889.png

 

 

Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.

TomMartens
Super User
Super User

Hey @Anonymous ,

 

welcome tom Power BI, hopefully you will enjoy your journey.

 

Now to your question, I would do the folling, create 4 separate numeric columns (whole integer) inside the table that stores the the IP4 adresses.

Then you can use these columns inside a numeric slicer and filter the ip's.

 

Maybe you will find this article interesting, in this article I describe how you can convert an ip4 adress into a number: https://www.minceddata.info/2018/07/27/using-power-query-to-conver-an-ip4-address-into-a-numeric-value/ Another approach for filtering IP adresses could be to create slicers that define ranges, these ranges then are converted to a number and this number is used to filter the ips. 

 

Hopefully, this provides some new ideas on how to tackle your challenge.

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.