r/PowerBI • • 15d ago

Question Query has exceeded available resources error

Hi guys,

I have a peculiar case and I find it hard to wrap my head around it.

Here's the setup. I run a deployment pipeline in PBI service. The main setup is between UAT & PRD. I got a pro license.

I have a report with some complex DAX calculations. It's been running for a few months now. I've handled some of the usual issues including a capacity limit warning I've had a week ago and had to schedule less frequent refreshes & synch with other teams with whom we share the capacity to do the same.

Today, out of the blue, I got an error message about available resources on my main matrix tables and it does not load. I've had similar issues in the past and it's normally when too much data is presented or when the daxes are too complex to compute.

What was peculiar about the case today was :

- It does not show in the local pbix, it only shows in the PBI service

- In the PRD enviroment, it shows the matrix but it gives me the error message when I try to use one particular filter ( 1 out of the 6 options that is not the heaviest selection)

-The matrix shows the error straight away in UAT enviroment in PBI service without the use of the filter.

-There is another page which loads super fast locally (unlike the previous main one which takes a 5-10 seconds) but it completely fails with the same error in the PBI service.

-Both pages have a common underlying dax measure but there are also 2 other pages which work just fine with the same underlying dax.

I'm strugglying to understand what is the core issue. In my experience, I should focus on make the matrix simpler (less data or less complex measures) but the inconsistency between enviroments and the "randomness" of why some things failed and others did not is driving me crazy.

If you have an idea what's this about or if you can explain such behavior or have had similar issues, please share.

I have considered it could be caused by a few different things but I don't understand the inconsistency of it. I'll work on it again tomorrow..

4 Upvotes

9 comments sorted by

•

u/AutoModerator 15d ago

After your question has been solved /u/prettyawesome2know, please reply to the helpful user's comment with the phrase "Solution verified".

This will not only award a point to the contributor for their assistance but also update the post's flair to "Solved".


I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

3

u/6665544332211 15d ago

Chris Webb's bi blog has a few good posts about this error. I would start there.

1

u/prettyawesome2know 15d ago

Thanks mate!

1

u/Final-Quote-4064 15d ago

Does one environment have less compute than the other?

2

u/prettyawesome2know 15d ago

Yes, there could be different capacities

1

u/DataDoctorX 13d ago

Is this direct query? Each visual has a max of 1gig, and that's a hard and fast service limit. How large is the matrix? Any conditional formatting? Any way you can either share the dax or make it more simple? Ideally, the matrix only displays gor large datasets instead of calculating everything in context. It's likely the dax + matrix combo that's breaching the limit. Try a simple sumx dax measure instead of the current dax. If it works, it's the dax + matrix combo.

1

u/prettyawesome2know 13d ago

It's an import. There're heavy daxes but it's been working well in the last couple of months. I'm working to simplify the daxes and a few other optimisations to limit the data & calcs

1

u/Appropriate_Dig_2106 15d ago

The Desktop vs Service difference is expected. Desktop uses your machine's RAM, while the service uses whatever query memory the workspace capacity allows, so a matrix that's only slow locally can fail in the service.

I wouldn't lean too hard on "this filter isn't the heaviest selection" either. One value can expand a relationship or an iterator far more than a visually bigger one, and UAT and PRD may not have the same data volume, refresh state, or even the same capacity. Since other pages with the same measure still work, I'd suspect the shape of the visual (rows, columns, totals, and how many measures are evaluated together) more than the measure itself.

Next I'd capture the failing matrix with that exact filter in Performance Analyzer, run the query in DAX Studio, and look at formula engine memory and any large materialization. In the service, also confirm UAT and PRD are on the same capacity and compare the dataset sizes. As a quick test, turn off totals and remove one row or column field to see whether the error follows the visual's grain rather than the filter.

1

u/Former_Celery_8335 12d ago

In power query bi setting there an area in report setting called query limit, you could try to match that to your service limits which could possibly help with seeing problematic queries. If the queries dax is quite complex it could be worth investigating moving the calculation upstream precalculate a table and do a simpler measure that way service is not doing calculation on the fly all the time.