Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Good morning!
I posted here yesterday, but realized overnight there's probably a far easier way to do what I'm trying to do.
Our data looks something like:
Department | Employee | Job Class |
0057 | John Smith | 100 |
0058 | Frank Doe | 101 |
0058 | John Jamieson | 107 |
0059 | Jane Friend | 115 |
0060 | Samuel Beckett | 100 |
0060 | James Joyce | 103 |
0061 | Alex Middleton | 103 |
We have (literally) hundreds of departments, and all of those departments need row level filtering to view their own data. In programming (Python) terms, we need to take our list of department codes, turn it into a set (remove the duplicates), and then create a list of roles based on that set. So, 0057, 0058, 0058, 0059, 0060, 0060, and 0061 turns into 0057, 0058, 0059, 0060, and 0061.
How can I mass create roles based on the unique values in a column?
Thanks!
Solved! Go to Solution.
Hi @alexlmiddleton ,
Normally dynamic RLS are based on username function.
For your requirement, you can apply RLS filter on value fields which you mentioned(use 'username' look up correspond value field and use this value to filter records).
After these steps, it will enable RLS filter effect based on username's department field.
Regards,
Xiaoxin Sheng
Hi @alexlmiddleton ,
Normally dynamic RLS are based on username function.
For your requirement, you can apply RLS filter on value fields which you mentioned(use 'username' look up correspond value field and use this value to filter records).
After these steps, it will enable RLS filter effect based on username's department field.
Regards,
Xiaoxin Sheng
User | Count |
---|---|
125 | |
106 | |
99 | |
63 | |
62 |
User | Count |
---|---|
135 | |
116 | |
101 | |
71 | |
61 |