Forum Discussion
RLS security based on State and Company table
- Anonymous3 years ago
HI ashishg,
Did you mean the company RLS table is the role settings you want to filter on these tables? Is there any index fields include in your ‘State RLS’ table?
I'd like to suggest you can use the current username and index field to find out the first ‘State’. Then you can use the ‘State’ as condition to lookup the ‘report fact’ table by ‘State’ and ‘product ID’ to find out first company.
After these steps, you can extract the result 'company' and current 'username' to apply RLS filter on table feilds.
Regards,
Xiaoxin Sheng
Anonymous
here is the tables , I'm not able to attached pbix file, Relationship as shown in above image
ReportFact
| ProductID | State | Price | Company |
| 1 | MH | 20 | |
| 2 | MH | 20 | |
| 3 | MH | 10 | |
| 4 | MH | 30 |
|
2. CompanyRLS
| Company | |
| [email protected] | |
| [email protected] | amazon |
3. StateRLS
| State | |
| [email protected] | MH |
| [email protected] | KL |
| [email protected] | MP |
- Anonymous3 years agoNot applicable
HI ashishg,
Did you mean the company RLS table is the role settings you want to filter on these tables? Is there any index fields include in your ‘State RLS’ table?
I'd like to suggest you can use the current username and index field to find out the first ‘State’. Then you can use the ‘State’ as condition to lookup the ‘report fact’ table by ‘State’ and ‘product ID’ to find out first company.
After these steps, you can extract the result 'company' and current 'username' to apply RLS filter on table feilds.
Regards,
Xiaoxin Sheng