Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Concatenated text measures causing 'locking conflict error message'

In Power BI Desktop, that is connecitng to a SQL Server database in import mode, I have some visuals that aren't loading due to an "Operation Cancelled due to locking conflicts" error message.

This is only happening on some visuals.

My data relates to teaching activities - I have what is like a "fact table" that contains only IDs; activity occurence ID, student ID, teacher ID. By occurence I mean that if an activity runs for 10 weeks - once a week, it has 10 occurences. If each occurence has 30 students attending, and 2 teachers delivering, there will be 60 rows in the fact table for that activity occurence.

 

I then have other tables (like dimension tables) for student details, teacher details, activity details whihc all have relationships to the fact table. 

 

I have some table visuals that work fine - these are ones that display the data at its most granular level - i.e. the same activity occurence will appear 60 times if it shows the activity name, student name and teacher name.

 

In other cases I need to group things together onto the same line in a table; I need to see, for an activity occurence, all teachers (concatenated) on the same row, and all students (concatenated) on the same row. For this, I use measures, as per below:

ALL Teachers = CONCATENATEX(DISTINCT('Teachers'[Name]),'Teachers'[Name],"; ")
ALL Students = CONCATENATEX(DISTINCT('Students'[Name]),'Students'[Name],UNICHAR(10))

When I try to put these measures onto a table visual, so the user can see an activity occurence, plus all tutors & students attending, in one row, that's when I get the "Operation Cancelled due to locking conflicts" error message.

 

The measures exist in my "fact table"

 

I'm not sure if I need to investigate this on the database side, or if there's something else I can do to get around this error. I need my data concatenated like the above measures to meet customer requirements.

 

 

  • Anonymous's avatar
    Anonymous
    4 years ago

    Thanks for your response. I found that once I filtered the data using slicers, table visuals containing the above measures loaded fine.

     

    I think this is a very misleading error message; I was under the impression there was an error somewhere betwene Power BI and the source database but given the addition of a slicer effectively bypasses the error, that doesn't seem to be the case.

2 Replies

  • Anonymous , How much data you have , try if values or summarize can work better

     

    ALL Teachers = CONCATENATEX(values('Teachers'[Name]),'Teachers'[Name],"; ")
    ALL Students = CONCATENATEX(values('Students'[Name]),'Students'[Name],UNICHAR(10))

     

     

    Can you share a sample pbix after removing sensitive data.

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thanks for your response. I found that once I filtered the data using slicers, table visuals containing the above measures loaded fine.

       

      I think this is a very misleading error message; I was under the impression there was an error somewhere betwene Power BI and the source database but given the addition of a slicer effectively bypasses the error, that doesn't seem to be the case.