Forum Discussion
DAX running slow
First date below 90% bookings =
Hi,
I have below dax and it gives the error: operation was cancelled because of locking conflicts.
Can you please help on how to optimise it and avoid the error.
VAR newtable =
ADDCOLUMNS (
SUMMARIZE ( Job, 'Booking'[County],'Booking'[Location Code],'Date'[Date]),
"@ratio", Job[Booking %]
)
VAR filtertable =
FILTER ( newtable, [@ratio] < 0.9 )
RETURN
IF (HASONEVALUE('Responsibility'[Name]), (MINX ( filtertable, 'Date'[Date] ) ), BLANK())
- Anonymous4 years ago
Hi Anonymous ,
If you’re making changes to your dataset (for example editing the DAX for a measure) in Power BI Desktop then Power BI has to wait for any DAX queries, that is to say the queries that get the data for your visuals, that are currently running to finish before it can save those changes. However if it has to wait too long to do this then it will kill any queries still running so it can go ahead and commit those changes, and when it does so you’ll see the “locking conflicts” error.
Since the problem is caused by long-running DAX queries the answer is to tune your queries to make them faster.
Best Regards,
Jay
4 Replies
- AnonymousNot applicable
Hi Anonymous ,
If you’re making changes to your dataset (for example editing the DAX for a measure) in Power BI Desktop then Power BI has to wait for any DAX queries, that is to say the queries that get the data for your visuals, that are currently running to finish before it can save those changes. However if it has to wait too long to do this then it will kill any queries still running so it can go ahead and commit those changes, and when it does so you’ll see the “locking conflicts” error.
Since the problem is caused by long-running DAX queries the answer is to tune your queries to make them faster.
Best Regards,
Jay
- Samarth_18
Community Champion
Hi Anonymous ,
Could you please let us know which type of connection mode you are using composite or direct query?
Thanks,
Samarth
- AnonymousNot applicable
I am using live connection to a tabular model.
- AnonymousNot applicable
I am using live connection to a tabular model.