Parameterized Direct Query In Power BI

Gerhard Brueckl shows how you can parameterize your SQL queries in Power BI, letting you switch server or database names and easily target a different location altogether:

I frequently work on projects where we have multiple tiers on which our solution is deployed to using continuous integration / continuous deployment (CI / CD) pipelines in Azure DevOps. Once everything is deployed, you also need to monitor these different environments and check the status of the data or ETL pipelines. My tool of choice is usually Power BI desktop as it allows me to connect to e.g. SQL databases very easily. However, I always ended up creating a multiple Power BI files – one for each environment.

Having multiple files results in a lot of overhead when it comes to maintenance and also managing these files. Fortunately, I came across this little trick when I was investigating in composite models and aggregations that I am going to explain in this blog post.

I have had to do exactly this same thing, so I’m going to have to try it out myself.

Related Posts

Storing Large Images in Power BI

Chris Webb shows us how to store a large image in Power BI: Jason Thomas and Gerhard Brueckl have both blogged on the subject of storing images as text inside a Power BI dataset:http://sqljason.com/2018/01/embedding-images-in-power-bi-using-base64.htmlhttps://blog.gbrueckl.at/2018/01/storing-images-powerbi-analysis-services-data-models/ Since they wrote those posts, however, Power BI has added the ability to set the Data Category property on measures as […]

Read More

Power BI Connection String Capitalization

Slava Murygin ran into a problem with capitalization on connection strings with Power BI Report Server: The message actually says:“Several errors occurred during data refresh. Please try again later or contact your administrator.”SessionID: 1b80301e-3898-417a-af9c-2e77ec490728[0] -1055784932: Credentials are required to connect to the SQL source. (Source at SQLServerName;DBA_Pro.). The exception was raised by the IDbCommand interface.[1] […]

Read More

Categories

March 2019
MTWTFSS
« Feb Apr »
 123
45678910
11121314151617
18192021222324
25262728293031