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.
I have a column named company ID that contains various comapnies with differnet employes in them, I need a DAX Query which will give data A/Q to the Company id, suppose if there are 3 employes inside a company and each of them have a companyid 1 then I they should able to see the reports of each other but they cannot be able to see the reports of comanyid 2 and 3, how this can be achived?
I know I can do this by creating different Roles for each companyid, but how can this be achived if I want this to be built in one particular role???
@Anmolgan,
Create the following tables in your scenario, and create relationship among these tables and your data table.
1.UserCompany table contains two fields(user email address , company id)
2. Users table contains a field(unique user email address)
3. Company table contains unique company id
Then you can add DAX filter "Users[user]=username()" in the Users table, this way, you can achieve dynamic Row level security. There is a blog for your reference.
https://www.kasperonbi.com/power-bi-desktop-dynamic-security-cheat-sheet/
Regards,
Lydia
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 |
---|---|
113 | |
97 | |
85 | |
70 | |
61 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |