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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Dunner2020
Post Prodigy
Post Prodigy

Duplicate value in Primary key

Hi there,

 

I have created a dimension table (which I named it fact table due to some other reasons) which contains a column called EpochNumber. EpochNumber is calculated as follow:

EpochNumber = (Duration.TotalDays([Date] - #date(2010,1,1))*48) + [Half Hour Number]

 

The purpose of EpochNumber is to assign a unique value to the half-hour time slot that occurred on any given date. I connected to the fact table and when I click on close and apply it throws the following error:

leo_89_0-1618862176022.png

 

However, when I looked on the 179759 value in the EpochHH column, there was not duplicate value. Could anyone help me in fixing the issue?

1 ACCEPTED SOLUTION
v-robertq-msft
Community Support
Community Support

Hi, @Dunner2020 

According to your sample picture, I think you should keep in mind that the data displayed in the Power BI desktop is loaded in after the transformation in the Power query, so as the error said, the data can’t be loaded because it contains the duplicate value, which is not supported by many-to-one relationship.

Therefore, to find the duplicate value, you should go to the Power Query editor to check the value and transform it:

v-robertq-msft_0-1619492589693.png

v-robertq-msft_1-1619492589696.png

 

More info about what is Power Query

Thank you very much!

 

Best Regards,

Community Support Team _Robert Qin

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-robertq-msft
Community Support
Community Support

Hi, @Dunner2020 

According to your sample picture, I think you should keep in mind that the data displayed in the Power BI desktop is loaded in after the transformation in the Power query, so as the error said, the data can’t be loaded because it contains the duplicate value, which is not supported by many-to-one relationship.

Therefore, to find the duplicate value, you should go to the Power Query editor to check the value and transform it:

v-robertq-msft_0-1619492589693.png

v-robertq-msft_1-1619492589696.png

 

More info about what is Power Query

Thank you very much!

 

Best Regards,

Community Support Team _Robert Qin

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

tchristy99
Helper II
Helper II

Hi,

 

If it has a duplicate value, it won't load it into the model which is why you won't be able to see it when you filter, thus giving it the appearance that there isn't a duplicate. You'll have to check your source in order to located the record that is causing you issues.

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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