Forum Discussion
vvirul
3 years agoNew Member
Performance improvement
I am trying to modify this query so that is loads in shortest amount of time, currently my query takes more that 20 seconds to load: Below is the DAX query Response % Complete Overtime = va...
Anonymous
3 years agoNot applicable
Hi vvirul ,
Please try this.
Response % Complete Overtime =
var max_date = LASTDATE('Date Table'[Date])
var temp = FILTER('Date Table', 'Date Table'[Date] <= max_date)
var running_total = CALCULATE(
countrows(Responses_overtime),
Responses_overtime[status] <> BLANK(),
USERELATIONSHIP('Date Table'[Date],Responses_overtime[updated_date]),
temp)
var number_needed = CALCULATE(
countrows(Responses_overtime),
USERELATIONSHIP('Date Table'[Date],Responses_overtime[updated_date]),
temp)
var result = DIVIDE(running_total, number_needed, BLANK())
return result
You can also optimize the performance by optimizing the model, etc.
Refer : Optimization guide for Power BI - Power BI | Microsoft Learn
Power BI Performance Optimization Tips (mssqltips.com)
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
vvirul
3 years agoNew Member
Thanks for the solution but this did not give the expected result. It definately tool less than a second to give result. I will use this solution somewhere else 🙂