The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
I have a measure which counts the number of days which are applicable toward goals my team has. it exlcudes holidays and weekends and changes the start date of the slicer to the training date if that date is larger than the start date. It also provides a zero day count if the training date is larger than the slicers end date. It works when I have the data extremely filtered to one month of training dates, but runs slow and fails when i have the training date filter off. Please advise how I could improve the measure's performance.
Solved! Go to Solution.
Hi @ConwayA
Did you check the following function?
NETWORKDAYS function (DAX) - DAX | Microsoft Learn
Best regards
Michael
-----------------------------------------------------
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Appreciate your thumbs up!
@ me in replies or I'll lose your thread.
-----------------------------------------------------
Hi @ConwayA
Is there a reason why you use the CalculateTable statement in the measure? Because this means in eahc measure calculation you calculate the same thing which increases the amount of preformance required. If it sis so slow can you not pre-calculate the table in Power Query or Dax so that you have a separate physical table you only refer to?
I also see that you have many other values in your visual. Is mabe one of the other measures the performance killer?
Best regards
Michael
-----------------------------------------------------
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Appreciate your thumbs up!
@ me in replies or I'll lose your thread.
-----------------------------------------------------
Hi @ConwayA
Did you check the following function?
NETWORKDAYS function (DAX) - DAX | Microsoft Learn
Best regards
Michael
-----------------------------------------------------
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Appreciate your thumbs up!
@ me in replies or I'll lose your thread.
-----------------------------------------------------
I updated the formula to use Networkdays but it is not resolving the issue, this is still running super slow when I remove the filter of only those trained in October. it works well when I remove the If statement but
it runs fine but it gives me negative days for those trained in November.
new formula
Hi @ConwayA
Is there a reason why you use the CalculateTable statement in the measure? Because this means in eahc measure calculation you calculate the same thing which increases the amount of preformance required. If it sis so slow can you not pre-calculate the table in Power Query or Dax so that you have a separate physical table you only refer to?
I also see that you have many other values in your visual. Is mabe one of the other measures the performance killer?
Best regards
Michael
-----------------------------------------------------
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Appreciate your thumbs up!
@ me in replies or I'll lose your thread.
-----------------------------------------------------
I changed holiday table back to a table to point to. no change in the failure rate.
I do not think it is a problem with the other items as it has run fine for a while and runs quick enough until i add this if statement. to get the zero day count when the training date is greater than the enddate.
You were right i had to change another measure I had using this measure. Thanks for your help.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
116 | |
81 | |
81 | |
48 | |
41 |
User | Count |
---|---|
149 | |
110 | |
66 | |
64 | |
56 |