Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hello!
I'd like to change the data type of a column to whole number, but it is not possible, because there are few "Table" values inside a column. How to solve this?
Thanks
Sander
Solved! Go to Solution.
Insert this statement and then change the column type. Replace #"Added Custom" with your previous step name
= Table.ReplaceValue(#"Added Custom",each [InvoiceNr],each if Value.Is([InvoiceNr],type table) then Table.FirstValue([InvoiceNr]) else [InvoiceNr],Replacer.ReplaceValue,{"InvoiceNr"})See the working here - Open a blank query - Home - Advanced Editor - Remove everything from there and paste the below code to test
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjQyVorViVaCUmbmFmDa1FQpNhYA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Invoice = _t]),
#"Added Custom" = Table.AddColumn(Source, "InvoiceNr", each if [Invoice]="678" then #table({"Col"},{{"897"}}) else [Invoice]),
Custom1 = Table.ReplaceValue(#"Added Custom",each [InvoiceNr],each if Value.Is([InvoiceNr],type table) then Table.FirstValue([InvoiceNr]) else [InvoiceNr],Replacer.ReplaceValue,{"InvoiceNr"}),
#"Changed Type" = Table.TransformColumnTypes(Custom1,{{"InvoiceNr", Int64.Type}})
in
#"Changed Type"
It contains numbers:
Insert this statement and then change the column type. Replace #"Added Custom" with your previous step name
= Table.ReplaceValue(#"Added Custom",each [InvoiceNr],each if Value.Is([InvoiceNr],type table) then Table.FirstValue([InvoiceNr]) else [InvoiceNr],Replacer.ReplaceValue,{"InvoiceNr"})See the working here - Open a blank query - Home - Advanced Editor - Remove everything from there and paste the below code to test
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjQyVorViVaCUmbmFmDa1FQpNhYA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Invoice = _t]),
#"Added Custom" = Table.AddColumn(Source, "InvoiceNr", each if [Invoice]="678" then #table({"Col"},{{"897"}}) else [Invoice]),
Custom1 = Table.ReplaceValue(#"Added Custom",each [InvoiceNr],each if Value.Is([InvoiceNr],type table) then Table.FirstValue([InvoiceNr]) else [InvoiceNr],Replacer.ReplaceValue,{"InvoiceNr"}),
#"Changed Type" = Table.TransformColumnTypes(Custom1,{{"InvoiceNr", Int64.Type}})
in
#"Changed Type"
Can you click on one of the tables and post the screenshot here to see what is contained in those tables?
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.