Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
PetyrBaelish
Resolver III
Resolver III

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.

 

 

1 ACCEPTED SOLUTION

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.

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@PetyrBaelish , 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.

 

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.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.