Forum Discussion
RLS Expression Evaluation Failed - Failed connection
- 9 months ago
Hi,
By the way it looks like we have been able to manage the issue applying a less drastical approach that implied:
1) Optimize DAX RLS Expression
E.g:Before
VAR AllowedDocs = SELECTCOLUMNS( FILTER( 'RLS_Document', LOWER('RLS_Document'[EmailAddress]) = LOWER([FixPBIUsername]) ), "DocID", 'RLS_Document'[Document UID] ) RETURN IF( DimDocVersion[Has RLS ?], DimDocVersion[Document UID] IN AllowedDocs, TRUE() )After
IF ( NOT DimDocVersion[Has RLS ?], TRUE(), CALCULATE ( COUNTROWS ( FILTER ( 'RLS_Document', 'RLS_Document'[Document UID] = DimDocVersion[Document UID] && 'RLS_Document'[EmailAddress] = [FixPBIUsername] ) ) ) > 0 )2) Implement Query Caching and Large semantic model (oour model has a size about 1 GB, so its a good candidate)
After these changes no more errors has been raised. Let's see if this is the final solution or issue re-appears. In such a case we will towards change the model import+directquery towards a import+direct lake.
Regards
Hi,
By the way it looks like we have been able to manage the issue applying a less drastical approach that implied:
1) Optimize DAX RLS Expression
E.g:
Before
VAR AllowedDocs =
SELECTCOLUMNS(
FILTER(
'RLS_Document',
LOWER('RLS_Document'[EmailAddress]) = LOWER([FixPBIUsername])
),
"DocID", 'RLS_Document'[Document UID]
)
RETURN
IF(
DimDocVersion[Has RLS ?],
DimDocVersion[Document UID] IN AllowedDocs,
TRUE()
)
After
IF (
NOT DimDocVersion[Has RLS ?],
TRUE(),
CALCULATE (
COUNTROWS (
FILTER (
'RLS_Document',
'RLS_Document'[Document UID] = DimDocVersion[Document UID]
&& 'RLS_Document'[EmailAddress] = [FixPBIUsername]
)
)
) > 0
)2) Implement Query Caching and Large semantic model (oour model has a size about 1 GB, so its a good candidate)
After these changes no more errors has been raised. Let's see if this is the final solution or issue re-appears. In such a case we will towards change the model import+directquery towards a import+direct lake.
Regards