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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
hadjigeo
Helper I
Helper I

MEASURE IS TOO SLOW

Hi ,

 

i have created the below measure and its very slow:

 

Capture.PNG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

also is it better to have multiple measures or have all the formulas in one?

1 ACCEPTED SOLUTION

Debug DAX using Variables in Power BI

https://www.youtube.com/watch?v=9SV2VnYbgg4

Debugging a slow Power BI report with Phil Seamark

https://www.youtube.com/watch?v=eABg872TAJU

 

If I answered your question, please mark my post as solution, this will also help others.

Please give Kudos for support.

 

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


View solution in original post

6 REPLIES 6

Hi @hadjigeo,

 

Please share your DAX Code as text.

Please make the DAX code more readable with the daxformater. https://www.daxformatter.com/

Please use DAX variables. https://www.sqlbi.com/articles/variables-in-dax/

Please share your PBIX-File.

 

Please give Kudos for support.

If I answered your question, please mark my post as solution, this will also help others.

 

Looking for German Power BI content? Visit my blog.
http://www.thinkbi.de/

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


Hi @mwegener ,

 

find below the text:

 

Sales3test =
IF (
[Validation Simulation] = 0,
0,
IF (
SUM ( 'PM Main JO'[Month Number] ) = 12,
MIN (
IF (
AND (
'Sales Achievement %'[Sales Achievement] >= 0.8,
'Sales Achievement %'[Sales Achievement] <= 1
),
( 0.5 + ( 'Sales Achievement %'[Sales Achievement] - 0.8 ) * 2.5 ),
IF (
AND (
'Sales Achievement %'[Sales Achievement] > 1,
AND (
'GP% Achievement'[GP% Achievement] >= 1,
OR (
'GP Achievement'[GP Achievement] >= 1,
'GP Achievement'[GP Achievement] <= 1
)
)
),
( 1 + ( ( 'Sales Achievement %'[Sales Achievement] - 1 ) ) * 2 ),
MIN ( 'Sales Achievement %'[Sales Achievement], 1.5 )
)
),
2
),
MIN (
IF (
AND (
'Sales Achievement %'[Sales Achievement] >= 0.8,
'Sales Achievement %'[Sales Achievement] <= 1
),
( 0.5 + ( 'Sales Achievement %'[Sales Achievement] - 0.8 ) * 2.5 ),
IF (
AND (
'Sales Achievement %'[Sales Achievement] > 1,
AND (
'GP% Achievement'[GP% Achievement] >= 1,
OR (
'GP Achievement'[GP Achievement] >= 1,
'GP Achievement'[GP Achievement] <= 1
)
)
),
( 1 ),
MIN ( 'Sales Achievement %'[Sales Achievement], 1 )
)
),
2
)
)
)

Hi @hadjigeo,

 

could you give a short overview of your model.
(Maybe a Screenshot)
To see the relations between the tables and the available columns and measures.

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


I have used the dax variables and the performance is really good

Debug DAX using Variables in Power BI

https://www.youtube.com/watch?v=9SV2VnYbgg4

Debugging a slow Power BI report with Phil Seamark

https://www.youtube.com/watch?v=eABg872TAJU

 

If I answered your question, please mark my post as solution, this will also help others.

Please give Kudos for support.

 

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


Good to hear. 🙂

 

If I answered your question, please mark my post as solution, this will also help others.

Please give Kudos for support.

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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