cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
ellac
Helper II
Helper II

Model performance issues due to complex RLS DAX code?

Hi community,

 

I have a question about RLS in our Azure Analysis Services at the model level, and whether the complexity of the RLS code can affect the performance of a PBI report connected with live connection. Namely, we are having performance issues for this particular report with this RLS solution, so I'm trying to dig into what the cause could be.

 

We have put RLS on a table because we want external guest users in our Azure Active Directory to be able to see a sales report, based on a specific vendor ID.

A separate table contains the guest users' email and their provider ID.

The RLS is set to their USERPRINCIPALNAME() with some changes made in DAX as we need to remove the email string which automatically gets some extra characters as they are guest users. See examples below.

 

USERPRINCALNAME() for guest user with email address "name@domain.com" becomes:
name_domain.com#EXT#@stadium365.onmicrosoft.com.

 

The DAX code in the RLS condition converts the string above to its original form "name@domain.com".

Long background… So, my question is – do you think it's worth optimizing this solution and get rid of the complex DAX code and maybe get a bit better performance on the sales report these guest users have access to?

If the complexity of the DAX code that sets the RLS condition does not affect the results of reports, is the mere fact that RLS exists making the report slow?

Sorry for such a long question, just let me know if you need more background. Thanks!

/Ella

1 ACCEPTED SOLUTION
v-shex-msft
Community Support
Community Support

HI @ellac,

In fact, these type of replace operations will not obviously affect the report performance data loading.

Normally the performance will been effect when you batch use Dax expressions with looping and iterators. Please take a look at the following link about Dax performances:

DAX Best Practices | MAQ Software Insights

Optimizing nested iterators in DAX - SQLBI

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

1 REPLY 1
v-shex-msft
Community Support
Community Support

HI @ellac,

In fact, these type of replace operations will not obviously affect the report performance data loading.

Normally the performance will been effect when you batch use Dax expressions with looping and iterators. Please take a look at the following link about Dax performances:

DAX Best Practices | MAQ Software Insights

Optimizing nested iterators in DAX - SQLBI

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors