cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Soldexio Frequent Visitor
Frequent Visitor

Re: Scheduled Refresh Custom Function

Hi @v-shex-msft,

 

Cheers for the elaboration, I have these working in Power BI desktop, however they do not work in services and scheduled refreshes. Therefore, this cannot be used in our case but I believe that concludes that this is not possible in Power BI sadly.

 

Thanks for the replies.

Soldexio Frequent Visitor
Frequent Visitor

Re: Scheduled Refresh Custom Function

Hi @cwebb, Chris,

 

Thank you for that post and elaboration, that is amazing and I will look in this and this seems to be the solution! Do you know if this also works when you need to pass Authorization towards the URL in order to validate the URL?

 

Kind regards,

 

Dennis

cwebb
Advisor

Re: Scheduled Refresh Custom Function

Ah, I didn't see that you are doing authentication using a header - no, I don't think it will work (see the comment by danzrust on the blog post). Sorry!

 

Chris

Soldexio Frequent Visitor
Frequent Visitor

Re: Scheduled Refresh Custom Function

Unfornate, then I will have to wait until Custom Functions that load in Power BI desktop are supported. Hopefully it will come soon, because this would be a major reason to switch to another BI tool Smiley Happy cheers!

Oscar_Mtz_V Frequent Visitor
Frequent Visitor

Re: Scheduled Refresh Custom Function

Hi, @cwebb great post, still I have a small issue, my code has two parameters, one part of the URL, the other is a query, thanks to your post I solved the second, still can´t find the right code for the first one.

 

Parameters are player and season.

 

Original code:

 

(Season,Player)=>

let
    Source = Web.Page(Web.Contents("http://www.espnfc.com/player/" & Player & "?season="&Season)),
    Data3 = Source{3}[Data],
    #"Changed Type" = Table.TransformColumnTypes(Data3,{{"Team", type text}, {"Oppo", type text}, {"Date", type date}, {"Comp", type text}, {"Res", type text}, {"Appear", type text}, {"g", Int64.Type}, {"a", Int64.Type}, {"sh", Int64.Type}, {"sg", Int64.Type}, {"fc", Int64.Type}, {"fs", Int64.Type}, {"yc", Int64.Type}, {"rc", Int64.Type}})
in
    #"Changed Type"

  

New code:

 

"Season" parameter is working, "Player" is the one I'm having the problem with, can't find the right code.

 

(Season,Player)=>

let
    Source = Web.Page(Web.Contents("http://www.espnfc.com/player/" & Player,
        [Query=[season=Season]]
        )),
    Data3 = Source{3}[Data],
    #"Changed Type" = Table.TransformColumnTypes(Data3,{{"Team", type text}, {"Oppo", type text}, {"Date", type date}, {"Comp", type text}, {"Res", type text}, {"Appear", type text}, {"g", Int64.Type}, {"a", Int64.Type}, {"sh", Int64.Type}, {"sg", Int64.Type}, {"fc", Int64.Type}, {"fs", Int64.Type}, {"yc", Int64.Type}, {"rc", Int64.Type}})
in
    #"Changed Type"

 

Your support is appreciated.

 

Regards,

 

Oscar