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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

Optimize median measure in dax

I have the below median measure that I am using in my report, but when I publish to power bi service, I get this error message "Resources Exceeded This visual has exceeded the available resources. Try filtering to decrease the amount of data displayed". Resource Governing: This query uses more memory than the configured limit. The query — or calculations referenced by it — might be too memory-intensive to run. Either reach out to your Analysis Services server administrator to increase the per-query memory limit or optimize the query so it consumes less memory. More details: consumed memory 11753 MB, memory limit 10240 MB."

 

I have increase the capacity in both AAS and Power BI but still getting same error.

The measure is

CALCULATE ( MEDIANX( FILTER('rep vFact', 'rep vFact'[loanAmount] > 0), ( 'rep vFact'[loanAmount])) )

 

Please, how do I optimze this measure to be more efficient. Thanks

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

You can try to Optimize your model to increase the performance.

vbinbinyumsft_0-1659433571649.png

For more details, you can read related document:Optimize a model for performance in Power BI  - Learn | Microsoft Docs

Best regards,
Community Support Team_ Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi @Anonymous ,

You can try to Optimize your model to increase the performance.

vbinbinyumsft_0-1659433571649.png

For more details, you can read related document:Optimize a model for performance in Power BI  - Learn | Microsoft Docs

Best regards,
Community Support Team_ Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

@bcdobbs , thanks for your response. I will check out the link you provided

bcdobbs
Super User
Super User

As a starting point you could try:

CALCULATE ( 
	MEDIAN( 'rep vFact'[loanAmount] )
	'rep vFact'[loanAmount] > 0
)

Also make sure the Loan Amount column is set to Decimal/Currency.

 

Not convinced above will work though. Will give it some more thought.

 



Ben Dobbs

LinkedIn | Twitter | Blog

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!

There is a limit on using MEDIAN on a table of 2 billion plus rows and suggested work around is the pattern in:

 

https://www.daxpatterns.com/statistical-patterns/#median



Ben Dobbs

LinkedIn | Twitter | Blog

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.