cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Rigoleto
Helper II
Helper II

Performace issue I am Usinge MAXX to compare a values from a table

Hi,

 

I have wroten a Measure field to calculate some values, "AVERAGE","GOAL" AND "MAX", everythign has being calculated as the request but, I having performace issues, notice in the example that I am using a MAXX function, remember this is a measure field, I am wondering why it went down with the performace? I am reading around 100 records..

 

 

 

SWITCH(
TRUE(),
MAXX('New Line Balance Table 2','New Line Balance Table 2'[NAME])="AVERAGE",AVERAGEc,
MAXX('New Line Balance Table 2','New Line Balance Table 2'[NAME])="GOAL",GOALc,
MAXX('New Line Balance Table 2','New Line Balance Table 2'[NAME])="MAX",MAXc
)

1 REPLY 1
v-yulgu-msft
Microsoft
Microsoft

Hi @Rigoleto,

 

I noticed that you used MAXX in your formula, sometimes MAXX might cause performance issue. I didn't find any related article describing best performance to use MAX and MAXX, here is a blog written about When to Use SUM() vs SUMX() which is similar.

 

In your scenario, please try this:

SWITCH(
TRUE(),
SELECTEDVALUE('New Line Balance Table 2'[NAME])="AVERAGE",AVERAGEc,
SELECTEDVALUE('New Line Balance Table 2'[NAME])="GOAL",GOALc,
SELECTEDVALUE('New Line Balance Table 2'[NAME])="MAX",MAXc
)

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power BI Dev Camp Session 23 768x460.jpg

Check it Out!

Mark your calendars and join us on Thursday, June 30 at 11a PDT for a great session with Ted Pattison!

June 20 episode 7 with aka link 768x460.jpg

The Power BI Community Show

Join us on June 20 at 11 am PDT when Kim Manis shares the latest on Azure Synapse analytics, the Microsoft Intelligent Data Platform, and notable Power BI Updates from Microsoft Build 2022.

Top Solution Authors
Top Kudoed Authors