Forum Discussion

Ardie0819's avatar
Ardie0819
New Member
2 years ago

Best practises for connecting to PowerBI to SQL

What is the best practises for connecting users using PowerBI Desktop to SQL?

1 Reply

  • Ardie0819 few items which I always take care of:

     

    1st, create paramters

     

    - Create parameter for server name

    - Create parameter for database name

    - Create parameter for schema name

     

    Connect to SQL server and remove fixed value with the parameters, this will give you option to change SQL server connection by changing the values in the parameter instead of changing SQL server connection string values in each table.

     

    2nd, don't use tables directly, create views and use views, if possible create a seperate schema for Power BI views to keep it seperate, and try to put as much business logic in these views instead of filtering, renaming columns, creating custom columns in the Power BI (or Power Query).