Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Row Level Security DAX not working with Direct Query Connection

Hi,

 

I have connected Power BI on DirectQuery mode with Teradata DB.

For implementing Row Level Security, I have written a DAX filter in Roles as below:

CONTAINSSTRING([GPID],(SCRTY_CNTRL[UserID]))

 

Where [GPID] is a column in my fact table where my Email IDs are stored as comma separetd values.

And [UserID] is a column in my Security table which maintains Email ID assigned to a particular market.

 

ContainsString function is supposed to find the Email ID present in fact table by comparing it to the Email ID that Im passing through USERPRINCIPALNAME() function.

This approach works absolutely fine in import mode.

But when applied in Direct Query its giving the below error:

Function "ContainsString" is not allowed as part of calculated column DAX expression in Direct Query models.

OR

"ContainsString" can not be used as DAX expression for Row level Security filter in Direct Query models.

 

I have tried various alternate functions like Search, Find etc but all are giving the same error.

 

But as per the Microsoft docs, all these function like CONTAINSSTRING, SEARCH, FIND should be supported for Row Level Security in Direct Query Models as they are optimized for the same.

Below is the link I am referring to - https://docs.microsoft.com/en-us/analysis-services/tabular-models/dax-formula-compatibility-in-direc...

 

Please resolve this issue as it has become a major bottleneck for implementing Row Level Security in my project.

Status: New
Comments
v-chuncz-msft
Community Support

@ManishSingh 

 

If it happens in the latest version of Power BI Desktop, just create a support ticket for assistance.

 

abishekvk
Regular Visitor

Did you get a solution for this problem? I am facing the same issue in my dashboard? Any leads ? 

thanks.