Forum Discussion
Change the SQL Database Name of a Data Source based on User ID
- 4 years ago
You might be able to do this if you used direct query and looked at this post by GilbertQ - Power Query (M) – Passing Parameters dynamically to a SQL Server Query - Data Analytics | FourMoo and Power BI
But not sure how performance would be, and what things Direct Query will mess up for you - you cannot use Power BI Time Intelligence.What I would be more inclined to do is create a view on the server that combines all relevant fact tables into one, with a new field that indicates the user name, then use RLS to filter the data at the report level.
You might be able to do this if you used direct query and looked at this post by GilbertQ - Power Query (M) – Passing Parameters dynamically to a SQL Server Query - Data Analytics | FourMoo and Power BI
But not sure how performance would be, and what things Direct Query will mess up for you - you cannot use Power BI Time Intelligence.
What I would be more inclined to do is create a view on the server that combines all relevant fact tables into one, with a new field that indicates the user name, then use RLS to filter the data at the report level.