Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin 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.
Hi,
I am trying to embed Power BI reports (using Direct Query) in my ASP.NET application, and get "Can't display the visual" message. I understand that I need to patch my data source credentials.
I am using this sample to provision my workspace, import reports, etc. Everything works great, except option #7 "Update connection string info for an existing dataset". Line 544 returns NULL into datasources variable, even though all three parameters are correct:
// Get the datasources from the dataset
var datasources = await client.Datasets.GetGatewayDatasourcesAsync(workspaceCollectionName, workspaceId, datasets.Value[datasets.Value.Count - 1].Id);
Any ideas what could be the problem?
Thanks,
Julia
Are you using SQL in direct query mode?
Yes, as I stated above, I am using DirectQuery mode.
And SQL Azure? Getting null there means that your dataset didn't bind to any gateway. This should only happen if you are not using one of the supported sources.
It is SQL Azure. I have datasets for both SSAS and regular databases. When I upload the report to Power BI Online, it works fine, so the gateway is working.
We don't support the enterprise gateway yet so the source must be in the cloud. This rules out SSAS and on premise SQL.
Ok, so SSAS is out for now. Then it should at least work with Azure SQL database? It's not on premise.
Yep. That would working. We are currently working on adding support for the gateway. So SSAS will start to work in a little bit.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
8 | |
6 | |
5 | |
2 | |
2 |
User | Count |
---|---|
4 | |
4 | |
3 | |
3 | |
2 |