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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Dimitris_Kats
Helper V
Helper V

Simplify DAX formula

Hello Dear members.

I have the following dax:

 

CALCULATE(
Credit'[Overdue]
,
KEEPFILTERS(
CALCULATETABLE(
TOPN(
'Top Customers'[Value],'Credit', 'Credit'[Overdue], DESC ), ALLSELECTED() )))

 

This is a real consuming DAX and constanty i am getting an error.
Is there any way to make it simplier and less consuming?

 

Thank you very much!

3 REPLIES 3
Dimitris_Kats
Helper V
Helper V

Hello.

 

Thank you very much for your suggested solution and I am so sorry for the late reply.
Unfortunately i am still getting a memory error with this measure 😞
Is there any way to make it even lighter?

 

Thank you again!

Icey
Community Support
Community Support

Hi @Dimitris_Kats ,

 

Have you tried what @SpartaBI mentioned?

 

If it works, please accept it as solution.

 

If not, could you share us the calculation scenario?

Reference: How to Get Your Question Answered Quickly - Microsoft Power BI Community

 

 

Best Regards,

Icey

SpartaBI
Community Champion
Community Champion

@Dimitris_Kats 
what is  'Top Customers'[Value]? a measure?
anyway try:
Measure =
CALCULATE (
    [Overdue],
    TOPN ( 'Top Customers'[Value], ALLSELECTED ( 'Credit' ), [Overdue], DESC )
)

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.