Forum Discussion
Security and Stored Procedures Parameters
- 7 years ago
Hi Anonymous,
It seems both of the two requirements are aim at filtering data for users.
Regarding the first one, you can create a parameter and modify the Power Query code like below.
let Source = Sql.Database("dale2016", "contosoretaildw", [Query="exec selectFromDimProduct " & PColor]) in SourceBut I'm afraid we can't pass the username to it.
Regarding the requirement two, the RLS will be the answer. Please refer to desktop-rls#define-roles-and-rules-within-power-bi-desktop and power-bi/service-admin-rls.
Best Regards,
Dale
- 7 years ago
Hi Anonymous,
That's exactly what the RLS will do. Please refer to the snapshot below.
Best Regards,
Dale
Hi Anonymous,
It seems both of the two requirements are aim at filtering data for users.
Regarding the first one, you can create a parameter and modify the Power Query code like below.
let
Source = Sql.Database("dale2016", "contosoretaildw", [Query="exec selectFromDimProduct " & PColor])
in
Source
But I'm afraid we can't pass the username to it.
Regarding the requirement two, the RLS will be the answer. Please refer to desktop-rls#define-roles-and-rules-within-power-bi-desktop and power-bi/service-admin-rls.
Best Regards,
Dale
- Anonymous7 years agoNot applicable
So can I apply RLS on slicers? For example, I have 5 departments: 1, 2, 3, 4, and 5. They are listed inside a slicer. The Director of department 1 cannot see the data concerning the other departments. Meaning: he cannot click on departments 2, 3, 4, or 5 in the slicer. Is this possible to do?
- v-jiascu-msft7 years agoMicrosoft Employee
Hi Anonymous,
That's exactly what the RLS will do. Please refer to the snapshot below.
Best Regards,
Dale