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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
dgyurdieva
Frequent Visitor

Locating users based on IP takes too long

Hi, 

So I have 2 tables - 1 with users and the other with IP ranges (3 columns (ipfrom, ipto, country).
The formula that I am trying to use is the following: 

Country = CALCULATE(VALUES('table1_ranges'[countryName]);filter('table1_ranges';'table2'[ip]>('table1_ranges'[ipFrom]-1) && 'table2'[ip] <= 'table1_ranges'[ipTo]))

 

However, it takes too long to calculate and does not even finalize the calculations it just keeps "Working on it" for very long time and then I close it. 
I've already minimized the number of tables, row and columns as much as possible.

Table 1 is with 370 000 rows and table 1 with 1 000 000.

 

Is there another solution for matchin IP with a range so that I can ge the country?

 

Thanks you

2 REPLIES 2
v-caliao-msft
Employee
Employee

@dgyurdieva,

 

370 000 rows is not too large for Power BI. In your scenario, could you please provide us the detail table structure with some sample data and your expected result, so that we can make further analysis.

 

Regards,

Charlie Liao

 Ok so I have 3 tables : 

userIdusernameipipnumber
1a127.255.555.6662147483647
2s127.255.555.6672147483648
3d127.255.555.6682147483649
4f127.255.555.6692147483650
5g127.255.555.6702147483651

 

ipFromipToCountry
3460505634605311USA
32789427883278942789Germany
21474836472147483653Poland
21574836692157483670UK
31133214723113322495Austria

 

Those two I use to get the country name for the respective idnumber. 

 

The third table is used to get the users that actually played games during some period and get the game the played and the platform. 

 

platformuseriddategame
a11.7.2017asd
b11.7.2017fgh
c23.7.2017asd
d33.7.2017asd
e33.7.2017fgh

 

The formula for getting the country name is inserted as a column in the first table. 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.