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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Denis_Diakov
Regular Visitor

We cannot convert the value "[Record]" to type List.. Value = [Record] - Only When publish it.

Hi everyone,

I'm having an issue that has been hard to solve. When I'm using Power BI Desktop and updating my data, everything runs well.

But when I publish it, the semantic model gets an error during the update, and the following error is displayed:
"We cannot convert the value '[Record]' to type List. Value = [Record]"

I don't know how to solve it because the error is very generic. Can someone help me?  Maybe a table merge started this problem, but I'm not sure what caused it. I'm including this piece of the script to help with the analysis.

#"Merged Queries" = Table.NestedJoin(#"Changed Type2", {"DeviceModel"}, Tarifagem, {"Modelo"}, "Tarifagem", JoinKind.LeftOuter),
#"Expanded {0}" = Table.ExpandTableColumn(#"Merged Queries", "Tarifagem", {"Franquia BW", "Franquia Color", "Valor BW", "Valor Color", "Locação"}, {"Tarifagem.Franquia BW", "Tarifagem.Franquia Color", "Tarifagem.Valor BW", "Tarifagem.Valor Color", "Tarifagem.Locação"}),
#"Replaced Value" = Table.ReplaceValue(#"Expanded {0}",null,0,Replacer.ReplaceValue,{"Tarifagem.Franquia BW"}),
#"Replaced Value1" = Table.ReplaceValue(#"Replaced Value",null,0,Replacer.ReplaceValue,{"Tarifagem.Franquia Color"}),
#"Replaced Value2" = Table.ReplaceValue(#"Replaced Value1",null,0,Replacer.ReplaceValue,{"Tarifagem.Valor BW"}),
#"Replaced Value3" = Table.ReplaceValue(#"Replaced Value2",null,0,Replacer.ReplaceValue,{"Tarifagem.Valor Color"}),
#"Replaced Value4" = Table.ReplaceValue(#"Replaced Value3",null,0,Replacer.ReplaceValue,{"Tarifagem.Locação"}),
#"Removed Columns1" = Table.RemoveColumns(#"Replaced Value4",{"TraySideDeck", "GroupName", "JobComment", "NonChargeReason", "CostCenterName", "CostCenterPath", "JobTicketField", "JobTicketFieldTwo", "JobTicketFieldThree", "CostCenterId", "CostCenterDescription", "UserNotificationEmailAddress", "Tray4", "Tray5", "Tray6", "Tray7", "Tray8", "TrayManual", "PagesSRA3", "PagesSRA4", "PagesTabloid", "HolePunch", "Staple", "Tray3", "PriceProfileId", "PriceProfileName", "DeviceMacAddress", "LocationId", "LocationPath", "LocationName", "Price"}),
#"Added Custom1" = Table.AddColumn(#"Removed Columns1", "Valor Impressao BW Total Reais", each if( [PagesA3] > 1) then [TotalBw] * [Tarifagem.Valor BW]* 2 else [TotalBw] * [Tarifagem.Valor BW]),
#"Added Custom2" = Table.AddColumn(#"Added Custom1", "Valor Impressao Color Total Reais", each if( [PagesA3] > 1) then [TotalColor] * [Tarifagem.Valor Color]* 2 else [TotalColor] * [Tarifagem.Valor Color]),
#"Changed Type1" = Table.TransformColumnTypes(#"Added Custom2",{{"Valor Impressao BW Total Reais", type number}, {"Valor Impressao Color Total Reais", type number}, {"UserName", type text}}),
#"Merged Queries1" = Table.NestedJoin(#"Changed Type1", {"UserName"}, Lista_funcionarios, {"Login"}, "Lista_funcionarios", JoinKind.LeftOuter),
#"Expanded {0}1" = Table.ExpandTableColumn(#"Merged Queries1", "Lista_funcionarios", {"Name"}, {"Lista_funcionarios.Name"}),
#"Added Conditional Column" = Table.AddColumn(#"Expanded {0}1", "Nome Completo", each if [Lista_funcionarios.Name] = null then [UserName] else [Lista_funcionarios.Name])



1 ACCEPTED SOLUTION
Denis_Diakov
Regular Visitor

I found the solution.

In fact, there wasnt a problem in the script. The error message was very generic, and because of that, the real problem was hidden.

One of my databases is a CSV file, and when I configured the permission level, I set it to Private. After I changed it to Public, the error didn't happen anymore.

View solution in original post

3 REPLIES 3
Denis_Diakov
Regular Visitor

I found the solution.

In fact, there wasnt a problem in the script. The error message was very generic, and because of that, the real problem was hidden.

One of my databases is a CSV file, and when I configured the permission level, I set it to Private. After I changed it to Public, the error didn't happen anymore.

v-xiandat-msft
Community Support
Community Support

Hi @Denis_Diakov ,

The error message "We cannot convert the value '[Record]' to type List. Value = [Record]" typically indicates that Power BI is expecting a list (an array of values) but is instead receiving a record (a single structured value). 

Ensure that the columns involved in the merge operation DeviceModel"#"Changed Type2"and "Modelo"Tarifagemhave matching data types. Mismatches in data types can lead to unexpected results during the merge.

Below is the official link will help you:

Data types in Power Query - Power Query | Microsoft Learn

Best Regards,

Xianda Tang

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

I see, and I already checked it.

But the error isn't shown in the desktop, only when the data is updated after I publish it. The #"Changed Type1" was an attempt to fix it because the error already happened before I inserted this step. I added it because I thought it could be the reason for the problem, but unfortunately, it isn't.

Helpful resources

Announcements
July 2024 Power BI Update

Power BI Monthly Update - July 2024

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

July Newsletter

Fabric Community Update - July 2024

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