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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Alison
Helper I
Helper I

Invoke Fucntion no longer works on Personal Gateway

I recently noticed that my invoke function stopped working on my personal gateway despite the fact that it works on my desktop application. The invoke function also previously worked on the gateway. However, now all results of the invoke function have thrown errors across all my different reports which use the same invoke function.

 

I noticed this after I made a few changes were made:

  1. I updated the gateway to the latest version (August 2020)
  2. I uninstalled and reinstalled the personal gateway
  3. I deployed a Dataflows in the same workspace

 

I am unsure which is responsible for the invoke function to stop working on the gateway.

1 ACCEPTED SOLUTION
Alison
Helper I
Helper I

I have isolated the problem and rectified the issue.

 

The gateway update had reset the privacy level settings for the data source to "Private" instead of "Organizational". Once this was remedied, the Invoke Function returned the intended values.

 

Thanks everyone for all your assistance!

View solution in original post

14 REPLIES 14
Alison
Helper I
Helper I

I have isolated the problem and rectified the issue.

 

The gateway update had reset the privacy level settings for the data source to "Private" instead of "Organizational". Once this was remedied, the Invoke Function returned the intended values.

 

Thanks everyone for all your assistance!

Those cursed privacy levels! Good catch @Alison .

 

Glad you are back up and running!



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting
Greg_Deckler
Super User
Super User

@Alison - Sorry, Invoke, is that a DAX function or ??


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

Hi @Greg_Deckler,

 

Invoke Function is added in Power Query. It converts UTC to AEST detailed in this post: https://community.powerbi.com/t5/Desktop/UTC-to-AEST/m-p/188878/highlight/true#M83075

 

It used to return a value on the gateway and still does on the desktop application. However it now returns a blank value only on the gateway which is really strange.

 

Cheers

@Alison - Oh, so it is just a custom M function? Can you paste the code from Advanced Editor for it?


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler, the invoke function advanced editor code is below:

 

Source = (DateTimeUTC as datetimezone) as datetimezone => try DateTimeZone.SwitchZone(DateTimeUTC,Table.Last(Table.SelectRows(UTC_OffSet, each [UTC] <= DateTimeUTC))[UTCOffset]) otherwise null

 

Where the UTC_Offset is a table with 3 columns:

AEST = datetime when the daylight savings turns on and off in AEST

UTCOffset = either 10 or 11 depending on the UTC + hours depending on daylight savings

UTC = datetime when the daylight savings turns on and off in UTC

@Alison - I don't see anything particularly offensive. @ImkeF @edhans ?


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

I don't see anything obvious @Alison as to why that would stop working. Have you upgraded to the latest personal gateway? If your Desktop app is on a newer version than your gateway, you may just need to get them in sync. Your local PBIX file may be upgraded in a way an older gateway doesn't understand.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

Hi @edhans,

 

The invoke function only stopped working after I updated my gateway to August 2020. My desktop application is also August 2020.

Can you be clearer on what you are seeing? You've said it throws errors, and that it returns blanks. Errors and blanks are not the same thing. And @ImkeF made a valid point - your try/otherwise construct should eliminate true errors barring a bug in the program.

Sometimes to aid in troubleshooting this, create a simple table that uses your custom function, then load that into the model and just create a table visual with all of those fields to see what it is doing. 

 

If it is an error, what is the error returned by the service?



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

Hi @Alison ,

how do you know that it's that function that causes the error?
You've included an error-handling statement there, so it should run return null if somethings getting wrong.

 

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

Hi @ImkeF ,

 

So when I run the function on my desktop the Invoke induction produces the intended results into a new column as expected. However after I publish the pbix file, and refresh it over the gateway, I noticed the new column where I should have my intended results are null.

 

I broke down each step and republished each time to troubleshoot what the gateway was struggling with:

  1. I imported the data into a new column -  RESULT: the column was popuated as intended in desktop and gateway
  2. I converted the data into a datetimezone format - RESULT: the column was popuated as intended in desktop and gateway
  3. I added a new column with the invoke function to convert the timezone - RESULT: the column was populated as intended in desktop but produced a null result when refreshed on the gateway


This is how I concluded it was the Invoke Function struggling. However, it did work with no issues before I did the following three things:

  1. I updated the gateway to the latest version (August 2020)
  2. I uninstalled and reinstalled the personal gateway
  3. I deployed a Dataflows in the same workspace

Imke might have an idea, but at this point, I'd be inclined to open a support ticket @Alison  - your above steps are pretty good trouble shooting steps that will assist them. You can create a ticket at the bottom of this page.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors