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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
tushartechlab
Advocate II
Advocate II

Direct Query With Publish to Web (embedded code link) not working

Hey DataGeeks,

 

I created a report and published it to Power BI Service on the cloud. It had a few reports working in "direct query" mode and some in "import" mode. It all worked well normally, but with the "Publish To Web" (Embedded Code Link) when I see the reports running on direct query are not working. Microsoft Documentation does mention that Live Data Connections are a limitation with publish to web functionality, but no where is a mention of "Direct Query" not functioning with this.

 

Please let me know where am I going wrong in configuring it (are there any special configurations on the Power BI Service needed for this?), and if Direct Query is not working with Publish To Web, do we have that mentioned somewhere on Microsoft / Power BI sites/documentations?

 

Help on this is much appreciated.

 

Regards,

Tushar

4 REPLIES 4
venal
Memorable Member
Memorable Member

@tushartechlab 

I have few queries to know the details.

 

1. Data Source. (Ex:- Dataset/Oracle/SQL Server..etc.,)

2. Connectivity Mode - Direct Query

3. Gateway version

4. Have you tried to publish the file to the another workspace and check for the option.

 

Note:- If the datasource is "Power BI Dataset" and accessed the same in different report, created a few measures and published the report. In this case we were unable to find the option. To avoid that we need to create the mesaures in Original report and access it in current one.

 

Hope it will help for your issue.

 

If you have any queries, please let us know.

 

If this post helps, then please consider Accept it as the solution to help the other members find it more
If this post was helpful may I ask you to mark it as solution and click on thumb symbol?

 

BR

venal.

 

Anonymous
Not applicable

Hi @tushartechlab ,

 

Based on my test, the report can be published to web when it connects to the data source use DirectQuery.

If you want to publish a report with DirectQuery, you will have to have the On-Premise Data Gateway installed.

You would then need to configure the On-Premise Data Gateway with the DirectQuery Data Source.

Once the above is done, you can then upload your Power BI Report. Once it has been uploaded it should notify you that it is connected to the Gateway.

 

Best Regards,

Jay

Community Support Team _ Jay Wang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thankyou guys,

 

I guess I figured out the problem. Everything was configured properly, but once I publish the report I have to go to data connections and reconfigure / map the data source to the gateway again, somehow it gets unmapped. I guess it is due to the "replace" option that I am selecting when deploying from local to the server from desktop. 

 

But I see that in direct query the reports in normal mode do show real-time data but the publish to web (embed code) reports don't show real-time data, I guess they still follow the caching mechanism in the direct query mode too, as mentioned on the Microsoft Website. So I guess it show the database changes after an hour? What are your thoughts guys?

 

Thanks for the response guys. 

Anonymous
Not applicable

Agreed. Based on my test, the visual will be refreshed after an hour. Yet i haven't found any document but there's some topic about it.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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