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
Anonymous
Not applicable

Dataflow error: Attribute collection contains non-unique values

Hi,
I'm using dataflows with PowerBI Pro and I get the following error message.
non-unique item names attribute collection.png
I can't find anything online about this error and in PowerBI desktop it loads just fine.
Within the query I'm calling an API but even if I don't call the API, I still get this message. 
I only get the error when naming the dataflow, so after I hit 'Save & Close'
Purging the whole table of duplicate rows is not really an option.

1 ACCEPTED SOLUTION

HI @Anonymous ,

I think this should related to your custom functions, it contains Record.ToTable functions.
If your records not have same format as cached in query steps, it will return error due to deal with not matched table fields.
Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

5 REPLIES 5
v-shex-msft
Community Support
Community Support

Hi @Anonymous ,

Can you please share more details information to help us clarify your scenario?(e.g. detail operation steps, query formula...)

How to Get Your Question Answered Quickly

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Anonymous
Not applicable

Hi,

I seems to happen randomly, really.
Mostly when I am actively working on a dataflow and I chance the M query code a lot.
I get the error regardless of the types of M code I run. Below is the code of the query that I run. Sometimes this code make me get the error, sometimes it doesn't. My browswer is the the Edge Beta.
//DST test
let
Geocoding = (adres as text) =>
let
Source = Json.Document(Web.Contents("http://www.datasciencetoolkit.org/maps/api/geocode/",[RelativePath="json?sensor=false&address="&adre...""])),
results = Source[results],
results1 = results{0},
geometry = results1[geometry],
location = geometry[location],
#"Converted to Table" = Record.ToTable(location),
#"Transposed Table" = Table.Transpose(#"Converted to Table"),
#"Promoted Headers" = Table.PromoteHeaders(#"Transposed Table", [PromoteAllScalars=true]),
#"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"lat", type number}, {"lng", type number}})
in
#"Changed Type",
Bron = Csv.Document(Web.Contents("https://vanbruggen.sharepoint.com/sites/ManagementInformatie/Gedeelde%20%20documenten/Excel 2.0/Afspraken/Rapportage Inbound 0800.csv"), [Delimiter = ";", Encoding = 1252, QuoteStyle = QuoteStyle.None]),
#"Headers met verhoogd niveau" = Table.PromoteHeaders(Bron, [PromoteAllScalars = true]),
#"Rapportages toegevoegd" = Table.Combine({#"Headers met verhoogd niveau", #"Rapportage Inbound Phonecare", #"Rapportage NHB", #"Rapportage Outbound Eigen klanten", #"Rapportage Kwaliteitslijsten", #"Rapportage Outbound"}),
#"Namen van kolommen gewijzigd" = Table.RenameColumns(#"Rapportages toegevoegd", {{"KPL Rayonnummer", "KPL oud"}}),
#"Rijen gefilterd" = Table.SelectRows(#"Namen van kolommen gewijzigd", each ([#"Resultcode omschr."] = "Adviseur belt voor afspraak" or [#"Resultcode omschr."] = "Afspraak definitief - kantoorbezoek" or [#"Resultcode omschr."] = "Afspraak definitief - thuisbezoek" or [#"Resultcode omschr."] = "Doorgeschakeld naar FN voor afspraak" or [#"Resultcode omschr."] = "Reeds afspraak definitief - kantoorbezoek" or [#"Resultcode omschr."] = "Reeds afspraak definitief - thuisbezoek" or [#"Resultcode omschr."] = "Reeds belt voor afspraak" or [#"Resultcode omschr."] = "Reeds doorgeschakeld naar FN voor afspraak")),
#"Renamed Columns" = Table.RenameColumns(#"Rijen gefilterd", {{"KPL oud", "Rayonnummer"}}),
#"Filtered Rows" = Table.SelectRows(#"Renamed Columns", each true),
#"Changed column type" = Table.TransformColumnTypes(#"Filtered Rows", {{"Beldatum", type date}}),
#"Filtered Rows1" = Table.SelectRows(#"Changed column type", each Date.IsInCurrentMonth([Beldatum])),
#"Added Custom" = Table.AddColumn(#"Filtered Rows1", "geocoding", each ([Straatnaam]&""&[Huisnummer]&","&[Postcode]&","&[Woonplaats]&",NL")),
#"Invoked Custom Function" = Table.AddColumn(#"Added Custom", "geocode", each Geocoding([geocoding])),
#"Expanded geocode" = Table.ExpandTableColumn(#"Invoked Custom Function", "geocode", {"lat", "lng"}, {"lat", "lng"}),
#"Transform columns" = Table.TransformColumnTypes(#"Expanded geocode", {{"geocoding", type text}, {"lat", type number}, {"lng", type number}}),
#"Replace errors" = Table.ReplaceErrorValues(#"Transform columns", {{"geocoding", null}, {"lat", null}, {"lng", null}})
in
#"Replace errors"

Kind regards,

Bram Dekker

HI @Anonymous ,

I think this should related to your custom functions, it contains Record.ToTable functions.
If your records not have same format as cached in query steps, it will return error due to deal with not matched table fields.
Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Anonymous
Not applicable

Hi Xiaoxin,

Thanks for the reply, I will mark it as a solution.
The next time this error comes up I will empty my browswers cache first and then try again.

Cheers,
Bram

Anonymous
Not applicable

I can't edit my original post but I was able to save once when copy pastig new code into the advanced editor. Then changed something in the query by removing a step, got the error again.

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.

Top Solution Authors
Top Kudoed Authors