Forum Discussion
how should I protect data when RLS is not an option?
- Anonymous1 year ago
Hi CBO2404 ,
I think you can do these steps below:
1. Create a relationship between the Fact_Reports and Fact_Access tables based on the reportid column.
2. You can create two measures.
HasAccess = VAR CurrentUser = USERPRINCIPALNAME() VAR ReportID = SELECTEDVALUE(Fact_Reports[reportid]) RETURN IF( ISBLANK(LOOKUPVALUE(Fact_Access[userprinciple], Fact_Access[reportid], ReportID, Fact_Access[userprinciple], CurrentUser)), TRUE(), FALSE() )VisibleComments = IF( [HasAccess], COUNTROWS(Fact_Reports), BLANK() )3. Use the measure in your visual to filter the comments. You can add the VisibleComments measure to your visual to ensure that only the comments the user has access to are displayed.
Best Regards
Yilong Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi CBO2404 ,
I think you can do these steps below:
1. Create a relationship between the Fact_Reports and Fact_Access tables based on the reportid column.
2. You can create two measures.
HasAccess =
VAR CurrentUser = USERPRINCIPALNAME()
VAR ReportID = SELECTEDVALUE(Fact_Reports[reportid])
RETURN
IF(
ISBLANK(LOOKUPVALUE(Fact_Access[userprinciple], Fact_Access[reportid], ReportID, Fact_Access[userprinciple], CurrentUser)),
TRUE(),
FALSE()
)VisibleComments =
IF(
[HasAccess],
COUNTROWS(Fact_Reports),
BLANK()
)
3. Use the measure in your visual to filter the comments. You can add the VisibleComments measure to your visual to ensure that only the comments the user has access to are displayed.
Best Regards
Yilong Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.