Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
Hi,
I have few fact table which have information specific to region (america, europe, apac, middle east etc...) and for each of the region i have product (pr1, pr2, pr3....) and for each product i have prodcut category (cat1, cat2, cat3....).
I would want to implement dynamic RLS in such a manner that any user who logs in will have access to a region and then by product or product category. I have 4 region, 10 product and 10 product category. I will create a Permission table having user mail, region, product and product category access. Then I create a relationship with fact tables to determine what data the user can have access to.
I have 2 queries here :
Pls suggest what is optimal way to implement Dynamic RLS that will cater the above needs. Thanks for your help.
Regards
Solved! Go to Solution.
For completion of this query, I was able to resolve it using a IN operator. Thanks
VAR _RLSProduct =
CALCULATETABLE(
VALUES('User'[RLS Product]),
'User'[email]=USERPRINCIPALNAME()
)
RETURN
SWITCH (TRUE(),
[Product] IN _RLSProduct , TRUE(),
FALSE()
)
Hi,
I was able to successfully implement RLS by creating role that had restrictions defined for Dimesion tables (Product, Product Category and Region).
I have a user table that has the following info. However, the issue I am facing is when I associate the same User (xyz@abc.com) to multiple Products, I get multiple rows as such my DAX function returns an error. Can you pls let know if there is an alternative to handle this situation. The DAX function is
VAR _RLSProduct =
CALCULATETABLE(
VALUES('User'[RLS Product]),
'User'[email]=USERPRINCIPALNAME()
)
RETURN
SWITCH (TRUE(),
[Product] = _RLSProduct, TRUE(),
FALSE()
)
| EmailId | Area | Product | Product Category |
| abc.xys@abc.com | US | ALL | CAT1 |
| xyz@abc.com | ALL | PRD1 | ALL |
| xyz@abc.com | ALL | PRD2 | ALL |
For completion of this query, I was able to resolve it using a IN operator. Thanks
VAR _RLSProduct =
CALCULATETABLE(
VALUES('User'[RLS Product]),
'User'[email]=USERPRINCIPALNAME()
)
RETURN
SWITCH (TRUE(),
[Product] IN _RLSProduct , TRUE(),
FALSE()
)
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 55 | |
| 34 | |
| 32 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 75 | |
| 72 | |
| 38 | |
| 35 | |
| 25 |