cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Super User IV
Super User IV

Re: IP address mapping

Thanks @jnickell for the mention and yes your steps described will work!





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

Highlighted
New Member

Re: IP address mapping

Hey,

 

Waking up an old topic but a relevant for me now 🙂 Thanks for this already - the info on this thread has helped me quite a bit 🙂

 

However I have run into an issue. I have a large dataset of IP-address information updating every day (over 32k addresses) and I'd like to have the location info as well. This is working now ok, but seems silly to use the API gateway for addresses that I already have the geo info from previous runs.

 

Is it possible to store the previous info somehow and just use the gateway for new info?

 

I have currently two tables as I have optimized the gateway load by just getting the info based on address c-class.

 

table 1:

ip-addrees | reduced to c-class | bunch of stuff

8.8.8.8 | 8.8.8.1 | stuff

8.8.8.12 | 8.8.8.1 | stuff

9.9.9.9 | 9.9.9.1 | stuff

9.9.9.200| 9.9.9.1 | stuff

 

Table 2:

GeoClassToGet | the geo info tru the function

8.8.8.1 | the geo info

9.9.9.1 | the geo info

 

So the question is that can I just preserve the table 2 info on the geo info that has been gotten already thru the gateway? And just apped the new info somehow?

 

Thanks in advance! 🙂

Highlighted
Super User IV
Super User IV

Re: IP address mapping

Hi there

Currently that would not be possible, but that could change when Incremental refresh comes to the Power BI Service.
You can currently do an incremental refresh in Power BI Premium. Where you could add a date for your IP Addresses and then only process the new ones.




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

Highlighted
Advocate I
Advocate I

Re: IP address mapping

Hi 

 

 

I'm getting the following error while trying to invoke a custom function

 

"Formula.Firewall: Query 'Final Table' (step 'Invoked Custom Function') references other queries or steps, so it may not directly access a data source. Please rebuild this data combination."

 

Thank you

Highlighted
Microsoft
Microsoft

Re: IP address mapping

Look up “formula firewall error power bi”. This is thoroughly documented online.
Highlighted
Regular Visitor

Re: IP address mapping

getting this error:

 

DataSource.Error: Web.Contents failed to get contents from 'https://ipapi.co/json/*************' (404): Not Found

 

Please help me 😞

Highlighted
Helper III
Helper III

Re: IP address mapping

Well their web resource is still working (for me at least).  Maybe the way your Web.content is structured is incorrect? 

 

Highlighted
Regular Visitor

Re: IP address mapping

I am new to Power BI aswell, i really dont understand what you are saying.
well, i have tried the way it is guided in this article. The code i am using for the function:

 

(#"IP Address" as text) =>
let
Source = Json.Document(Web.Contents("https://ipapi.co/json/" & #"IP Address")),
#"Converted to Table" = Record.ToTable(Source),
#"Transposed Table" = Table.Transpose(#"Converted to Table"),
#"Promoted Headers" = Table.PromoteHeaders(#"Transposed Table")
in
#"Promoted Headers"

 

Tried below code aswell, same error:

 

let
Source = (#"IP Address" as text) => let
Source = Json.Document(Web.Contents("https://ipapi.co/json/" & #"IP Address")),
#"Converted to Table" = Record.ToTable(Source),
#"Transposed Table" = Table.Transpose(#"Converted to Table"),
#"Promoted Headers" = Table.PromoteHeaders(#"Transposed Table")
in
#"Promoted Headers"
in
Source

Highlighted
Helper III
Helper III

Re: IP address mapping

Take a look at their API documenation on how to get a JSON result.  https://ipapi.co/#api

 

You need to re-order how you are building the Web.Contents string.

You're currently doing this:

Source = Json.Document(Web.Contents("https://ipapi.co/json/" & #"IP Address")),

You should try this:

Source = Json.Document(Web.Contents("https://ipapi.co/" & #"IP Address" &"/json/")),

 

Highlighted
Regular Visitor

Re: IP address mapping

Thanks alot sir. It worked, thanks once again.

Helpful resources

Announcements
Upcoming Events

Upcoming Events

Wondering what events you could join or have an event to promote yourself? Check out our Upcoming Events.

Upcoming Events

Community Summit North America – Join Online!

Join this community-driven Power Platform digital event for unbiased support and problem-solving.

Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Top Solution Authors