Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

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())

  • Anonymous's avatar
    Anonymous
    4 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.

    Refer: https://blog.crossjoin.co.uk/2021/10/31/understanding-the-the-operation-was-cancelled-because-of-locking-conflicts-error-in-power-bi/ 

     

    Best Regards,

    Jay

4 Replies

  • Anonymous's avatar
    Anonymous
    Not 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.

    Refer: https://blog.crossjoin.co.uk/2021/10/31/understanding-the-the-operation-was-cancelled-because-of-locking-conflicts-error-in-power-bi/ 

     

    Best Regards,

    Jay

  • Samarth_18's avatar
    Samarth_18
    Icon for Community Champion rankCommunity Champion

    Hi Anonymous ,

     

    Could you please let us know which type of connection mode you are using composite or direct query?

     

    Thanks,

    Samarth

  • Anonymous's avatar
    Anonymous
    Not applicable

    I am using live connection to a tabular model.

  • Anonymous's avatar
    Anonymous
    Not applicable

    I am using live connection to a tabular model.