cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
cyberama
Level: Powered On

PowerBIIntegration.Refresh() not refreshing the report.

Use Case: Update coordinates in PowerApps for a location plotted in a scatter chart within PowerBI report to move the bubble  to a different X,Y location.

 

Problem statement: Using Powerapps custom visual in PowerBi does not update the power bi report with changes while using the new PowerBIIntegration.Refresh() call.

Welcome any help from someone who has used this power apps visual in the link below (powerapps custom visual for power bi v2) to update changes back to power bi using the latest PowerBIIntegration.Refresh() call.

 

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/powerapps-custom-visual

 

Here were my steps:

1. Developed a new PBI report with a scatter chart using sharepoint online as the data source. The location entity that i used has data following fields: location ID, location name, X coordinate, Y coordinate and last updated on.

2. Added PowerApp custom visual and picked the same entity and fields as in the report.

3. Created and published a new PowerApp with the auto generated gallery along with an edit from that I added to update X,Y coordinates to move the bubble around the scatter chart.

4. Selected a bubble in the scatter chart which selected the appropriate location in PowerApps. Made changes to X,Y coorindates and selected SAVE button to submit the form. See the changes correctly written to share point list.

5. Power BI report however does not move the location visually and data is still old when you click to do show data on the visual.

 

Problem: Power BI report after auto refreshing itself doesn't show the changes meaning the bubble didn't move to new X,Y coordinate. PowerApp has new coordinates, however PowerBI has old coordinates.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
MawashiKid
Level: Powered On

Re: PowerBIIntegration.Refresh() not refreshing the report.

Okay I managed to make things work. The solution to the enigma seemed rather a bit subtle... anyway...


@senpaicoder wrote:

Hi,

Unfortunately adding the PowerBIIntegration.Refresh() method just didn't work in my case. So to make a long story short,
I tried to reproduce a basic similar sample to the one we may find on following video
PowerApps custom visual for Power BI V2

 

1) For sake of testing the feature, I first created a very simple report on Power BI Desktop and connected it to an
    Azure SQL Database in DirectQuery mode.

2) I then added a custom PowerApps visualization in the Power BI Desktop report. When prompted to select either an existing
    app or create a brand new one, I chose the 2nd option allowing me to create a brand new on "all-from-scratch".
    I used the very same Azure SQL Database as Data Source.
3) I then wanted to add the PowerBI PowerBIIntegration.Refresh() method to OnSelect() option, though it displayed an
    "Invocation of unknown or unsupported function" error... It seems the function is missing somewhere... 
Unsupported.png

I haven't found any concise explanation so far, so any information on how to cope with that would be appreciated. Thank you. 
  



I may be wrong but at this stage the only possible path to achieve what I want was

1) by selecting to create a brand new PowerApps application "all-from-scratch" and NOT an an existing one when prompted. 

2) and probably not the least... if you watch carefully on Charles Sterling's video, the PowerApps visualization integration step is NOT performed on Power BI Desktop but on Power BI Online

So in my case, the main way to manage PowerApps visualization integration with PowerBIIntegration.Refresh method successfully had to be performed from a report I had published online in a Workspace in Editing mode... Things then worked like a charm... 😊

View solution in original post

5 REPLIES 5
Community Support Team
Community Support Team

Re: PowerBIIntegration.Refresh() not refreshing the report.

Hi @cyberama ,

 

Is this app a newly created app or did you add this function to an existing app? The Refresh() function gets added to PowerApps from the visual on creation. Therefore it will not be available for existing PowerApps. The workaround for now is creating a new app and then copy and paste the items from the existing app. If you need this feature, please upvote this uservoice request.

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
cyberama
Level: Powered On

Re: PowerBIIntegration.Refresh() not refreshing the report.

Appreciate the reply very much!!!

Good question. I wanted to use it in an existing app. Since I saw the warning from some blog posts, I created a new app. first to test and make sure it works. My plan is to continue with this new app. and add some of the screens I need from old app. to new.

I have zipped up screens in case you want to see it. All straight forward I think and nothing fancy I did. Thanks again for your help!!

jbarnes
Level: Powered On

Re: PowerBIIntegration.Refresh() not refreshing the report.

I know this is an old thread but rather than creating a new one for the same thing I thought I'd try and *bump* this one.

I have exactly the same issue. I click the powerapp button, it submits my update but doesn't refresh the data.

I initally had my data on direct query so thought this might have been the issue - so I rebuilt everything using loaded ables, but I get no response on that either.

Would appreciate any thoughts on this.

 

Thanks.

senpaicoder
Level: Powered On

Re: PowerBIIntegration.Refresh() not refreshing the report.

Hi,

Unfortunately adding the PowerBIIntegration.Refresh() method just didn't work in my case. So to make a long story short,
I tried to reproduce a basic similar sample to the one we may find on following video
PowerApps custom visual for Power BI V2

 

1) For sake of testing the feature, I first created a very simple report on Power BI Desktop and connected it to an
    Azure SQL Database in DirectQuery mode.

2) I then added a custom PowerApps visualization in the Power BI Desktop report. When prompted to select either an existing
    app or create a brand new one, I chose the 2nd option allowing me to create a brand new on "all-from-scratch".
    I used the very same Azure SQL Database as Data Source.
3) I then wanted to add the PowerBI PowerBIIntegration.Refresh() method to OnSelect() option, though it displayed an
    "Invocation of unknown or unsupported function" error... It seems the function is missing somewhere... 
Unsupported.png

I haven't found any concise explanation so far, so any information on how to cope with that would be appreciated. Thank you. 
  

MawashiKid
Level: Powered On

Re: PowerBIIntegration.Refresh() not refreshing the report.

Okay I managed to make things work. The solution to the enigma seemed rather a bit subtle... anyway...


@senpaicoder wrote:

Hi,

Unfortunately adding the PowerBIIntegration.Refresh() method just didn't work in my case. So to make a long story short,
I tried to reproduce a basic similar sample to the one we may find on following video
PowerApps custom visual for Power BI V2

 

1) For sake of testing the feature, I first created a very simple report on Power BI Desktop and connected it to an
    Azure SQL Database in DirectQuery mode.

2) I then added a custom PowerApps visualization in the Power BI Desktop report. When prompted to select either an existing
    app or create a brand new one, I chose the 2nd option allowing me to create a brand new on "all-from-scratch".
    I used the very same Azure SQL Database as Data Source.
3) I then wanted to add the PowerBI PowerBIIntegration.Refresh() method to OnSelect() option, though it displayed an
    "Invocation of unknown or unsupported function" error... It seems the function is missing somewhere... 
Unsupported.png

I haven't found any concise explanation so far, so any information on how to cope with that would be appreciated. Thank you. 
  



I may be wrong but at this stage the only possible path to achieve what I want was

1) by selecting to create a brand new PowerApps application "all-from-scratch" and NOT an an existing one when prompted. 

2) and probably not the least... if you watch carefully on Charles Sterling's video, the PowerApps visualization integration step is NOT performed on Power BI Desktop but on Power BI Online

So in my case, the main way to manage PowerApps visualization integration with PowerBIIntegration.Refresh method successfully had to be performed from a report I had published online in a Workspace in Editing mode... Things then worked like a charm... 😊

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,035)