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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

how to ignore duplicate or null values in relational fields

How to ignore duplicate or null values in relation fields ?

 

I am not able to Refresh Data due to duplicate values exist on ID4 Field

check below image.

 

duplicate.jpg

 

 

below are resilt from Scheduler:

SessionID: 07327ef1-3c8c-4d4f-89c2-4889198f7d3c [0] -1053425602: Column 'ID4' in Table 'AGTPRF_LND_HCHY' contains a duplicate value '93673' 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. [1] -1055784934: The command has been canceled.. The exception was raised by the IDataReader interface.

 

 

Note : The duplicate is not mistake .. but it`s nessary from bussiness logic prespectave

 

 

ERD.jpg

 

 

 

 

 

 

 

 

select * from AGTPRF_LND_HCHY where ID4=93673

 

Head of DepartmentIDManagerID1UnitManagerID2TeamLeaderID3NameID4LAN
Adam18828Yasmien19797Sara19797Samy19895Dimond9367393673
Adam18828Yasmien18790Erik33568John33568Mark93673493673

 

How to ignore duplicate or null values in relation fields ?

4 REPLIES 4
Tahreem24
Super User
Super User

Go to Power Query Editor from menu bar - - >select column which you wanna remove duplicate record - - >right click on that column - - >select remove duplicate

Please give Kudos to this effort and mark it as a solution if it helps you. ☺️
Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard
Anonymous
Not applicable

thx for response @Tahreem24 

 

BUT this not what I asking for.

as I mentioned "The duplicate is not mistake .. but it`s nessary from bussiness logic prespectave"

Therfore : I want PBI refresh data regardles "duplicate , null " values.

 

anybody can advice ?

Anonymous
Not applicable

For more Clarefication:-

                                if I delete the duplicate it will be Report will have "Missing Data".

Therefore ; need to avoide "delete duplicate data" and PBI refresh data regardles "duplicate , null " values.

 

anybody can advice ?

 

Hi @Anonymous 

As the error message said: 

Column 'ID4' in Table 'AGTPRF_LND_HCHY' contains a duplicate value '93673' 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

 

Please recreate the relationship, 

if table AGTPRF_LND_HCHY' use 'ID4' as a key to create a relationship with other tables, it should be many side instead of one side.

 

Besides, there are many errors when refreshing,

to check which causes the refresh failing,

edit the relationship as above, then see if the relationship or duplicate/null values causes the refresh error.

 

Similar threads about the odbc error:

https://community.powerbi.com/t5/Desktop/Getting-the-dreaded-OLE-DB-or-ODBC-error-Exception-from-HRESULT/td-p/147194

https://community.powerbi.com/t5/Desktop/0x80040E4E-Error-OLE-DB-or-ODBC/td-p/116683

https://community.powerbi.com/t5/Desktop/OLE-DB-or-ODBC-error-Exception-from-HRESULT-ox80040E1D/td-p/605054

 

Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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