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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
jcs93
Helper I
Helper I

Visual Not loading - RLS and Direct Query

I have an issue in a report I'm developing...Here's the summary

 

Large report, using a mix of Direct Query and Import to compartmentalize data to allow deployment with RLS, restricting table access on a use case-by-use case basis.

 

Works greate on the desktop and online, until I include Conditional Formatting in a visual that's pulling data from a DQ Table.  When I "view as role," I get an error code of "Internal error: An expression services limit has been reached. Please look for potentially complex expressions in your query, and try to simplify them.. The exception was raised by the IDbCommand interface."

 

When I 'copy details' and look at the code, it ends up being about ~19,000 characters.  I've since turned many of my queries into SQL views to reduce the line/character count, thus simplifying the m code behind.

 

In short, a large report (~146mb PBIX) with 22 tables with a mix of Import and Direct Query.  The 'M Query' to build is 13,352 characters after changing over to 5 SQL Views.  I'm using the April 2019 version of PBI Desktop.  The 'Failure to load visual' only comes up on a single visual that pulls data from a single table.

 

I do have one other visual that uses DQ through a SQL View with Conditional Formatting that works just fine.

1 ACCEPTED SOLUTION

@v-xicai 

 

Thank you...you got me pointed in the right direction.  It turned out that my custom columns in the DQ table were the culprit.  I remove the custom columns and put the fields into SQL and it works perfectly.

View solution in original post

2 REPLIES 2
v-xicai
Community Support
Community Support

Hi @jcs93 ,

 

According to your error message:>>"Internal error: An expression services limit has been reached. Please look for potentially complex expressions in your query, and try to simplify them.. The exception was raised by the IDbCommand interface.". Maybe you have create a column or measure using complex DAX code, please simplify it, for and try it again.

Or try to upgrade the Power BI Desktop to the latest version 2.68.5432.841.

 

If the issue still exist ,I would suggest you create a support ticket  to get dedicated support: 

 

1.gif

Best Regards,

Amy

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

@v-xicai 

 

Thank you...you got me pointed in the right direction.  It turned out that my custom columns in the DQ table were the culprit.  I remove the custom columns and put the fields into SQL and it works perfectly.

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

July Power BI Update Carousel

Power BI Monthly Update - July 2026

Check out the July 2026 Power BI update to learn about new features.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors