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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
mca69
Regular Visitor

Best practise to hide sql query code in report

Hi,

I am currently working on a model to distribute power bi reports based on desktop experience and power BI service as well. The thing is, I would like to hide the sql query code from the report, or any other solution to preserve any access to it. Mostly, I connect reports to sql server databases, on premise as well as online (azure sql database).

Anyone with answer or tip to that ?

Thanks in advance. Very much appreciated.

Regards.

2 ACCEPTED SOLUTIONS
DataInsights
Super User
Super User

@mca69,

 

You could create dataflows that contain SQL, and then connect Power BI Desktop to the dataflows. This would prevent users from being able to access the SQL in Power BI Desktop.

 

https://docs.microsoft.com/en-us/power-bi/transform-model/dataflows/dataflows-introduction-self-serv... 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

Hi,

First of all, thank you for that particular answer. In addition to be one of the best solutions for hiding SQL script that I tried for a couple of days, I discovered a very powerful funtionnality in data modeling. Sure there must be some disadvantages to use power bi dataflows but till now I haven't find any and I think it is just the best way to model and reuse data.  

View solution in original post

3 REPLIES 3
mca69
Regular Visitor

Hi,

Thanks for the answer. I am going to investigate if dataflows could be a solution. I will let you know.

 

DataInsights
Super User
Super User

@mca69,

 

You could create dataflows that contain SQL, and then connect Power BI Desktop to the dataflows. This would prevent users from being able to access the SQL in Power BI Desktop.

 

https://docs.microsoft.com/en-us/power-bi/transform-model/dataflows/dataflows-introduction-self-serv... 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Hi,

First of all, thank you for that particular answer. In addition to be one of the best solutions for hiding SQL script that I tried for a couple of days, I discovered a very powerful funtionnality in data modeling. Sure there must be some disadvantages to use power bi dataflows but till now I haven't find any and I think it is just the best way to model and reuse data.  

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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