Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
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?
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 8 | |
| 7 | |
| 5 | |
| 4 | |
| 3 |
| User | Count |
|---|---|
| 20 | |
| 14 | |
| 11 | |
| 9 | |
| 8 |