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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
simormate
Frequent Visitor

Duplicate value error message in Power BI, when the same code works in DAX Studio

I use the following code for a calculated table in Power BI:

CALCULATETABLE(

Contracts,
PricePlans[Range] = TRUE(),
Partners[Parent Company Name] = BLANK()

)

The table cannot be created, and I receive the error message saying:

Column '' in Table '' contains a duplicate value '24909' and this is not allowed for columns on the one side of a many-to-one relationship or for columns that are used as the primary key of a table.

I guess there should be column and table names between the single quotes, but there is nothing. I also checked the two relationships, both are many-to-one. The value 24909 is twice on the many side, and once on the one side.

 

What's even weirder is that the same command runs flawlessly in DAX Studio and gives back the result I look for.

 

Any help would be greatly appreciated.

1 ACCEPTED SOLUTION
simormate
Frequent Visitor

Ok, I found a solution, I just needed to ask the question here 🙂

I deleted the table and recreated it again, and it worked. Maybe it had to do with a calculated column I added to this table. After adding the calculated column, I modified the model somewhat, which resulted in the error message.

 

Anyway, I would still love to hear some ideas about how could I have diagnosed the problem.

View solution in original post

2 REPLIES 2
Syndicate_Admin
Administrator
Administrator

I got the idea of deleting and recreating the table again. However, it is very strange. In my case I get the same message but I was creating a table with the DAX UNION function and according to the documentation although there are duplicates in the two sets with the same columns, it still failed me but it should work. I backed up the DAX code, deleted the table then recreated it with the same code and that's it.

simormate
Frequent Visitor

Ok, I found a solution, I just needed to ask the question here 🙂

I deleted the table and recreated it again, and it worked. Maybe it had to do with a calculated column I added to this table. After adding the calculated column, I modified the model somewhat, which resulted in the error message.

 

Anyway, I would still love to hear some ideas about how could I have diagnosed the problem.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.