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.
As of now we are loading all the Records from SQL Server and apply Row Level Security at PowerBI level to implement Data masking. We are seeing performance issues to load all the user Records . Can any one provide details of passing username as a parameter to SQL Query to fetch only the respective user Records.
I understand that there is no option to pass Dax Function UserPrincipalname() / username() to SQL query from the Power Query editor.
@Anonymous , I doubt that is possible.
@ImkeF , is that possible?
Hi @Anonymous ,
there is no native function to get the usernam in Power Query.
And using the SQL-Current_user function would only fetch the service account under which the dataset is refreshed.
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
Hi ImkeF,
Yes you are correct . Even I have tried the SQL -CurrentUser() , this is returning the Service account which is configured for Data Refresh.
Not sure if any one had tried "SQL Server Row Level Security". I am not sure whether this would work for this problem.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
97 | |
85 | |
70 | |
61 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |