Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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.
Solved! Go to Solution.
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.
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.
Hi,
Thanks for the answer. I am going to investigate if dataflows could be a solution. I will let you know.
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.
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.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 40 | |
| 35 | |
| 34 | |
| 31 | |
| 28 |
| User | Count |
|---|---|
| 136 | |
| 102 | |
| 68 | |
| 66 | |
| 58 |