Include MissingField Argument with Table.TransformColumnTypes Function for Power Query
9 Comments
- alexander8New MemberI agree!!
- 924409New Member
Agreed!
This would have saved hours of searching for alternatives for me.
- ameer_shakourNew Member
PowerBi team, it has been 5 years. Let's do this already. This is a no-brainer. We are using dynamic data not static unless PowerBI wants to be known stable for its static capabilities only.
- Arete_ZhouNew Member
Refreshing will not fail, and it definitely will save PBI developers' life. After all, the business guys may don't want some columns after some periods.
- jordy_moormanNew Member
This function would be so great to have - for others wishing for the same, here's a good custom function to provide similar results until MSFT provides a solution:
- rick1New Member
Thanks greg, I love that idea. Currently the MissingField function are only used for:
- Record.RemoveFields
- Record.RenameFields
- Record.ReorderFields
- Record.SelectFields
- Record.TransformFields
- Table.FromRecords
- Table.RemoveColumns
- Table.RenameColumns
- Table.ReorderColumns
- Table.SelectColumns
- Table.TransformColumns
Sounds great to add Table.TransformColumnTypes to it.
If at any time you're curious where numeration are used, I think you'll find this page useful: https://powerquery.how/missingfield-error/
- fbcideas_migusrNew MemberStatus added:Needs Votes
- user10456Advocate IThe documentation says this should work, but it isn't working yet https://learn.microsoft.com/en-us/powerquery-m/table-transformcolumntypes
- m_dekorteResident Rockstar
user10456 It works in Power BI Desktop version 2.143.1378.0 (May 2025) and later, for Excel users it will depend on your O365 version/channel (confirmed on Current and M365 Monthly). Here's a sample you can try.
let /* The July 2025 update to the documentation now mentions a MissingField type for Table.TransformColumnTypes */ /* Here's sample data, a table with two columns: Date and Value */ Source = #table( type table [Date = date, Value = number], { {#date(2024, 3, 12), 0.24368}, {#date(2024, 5, 30), 0.03556}, {#date(2023, 12, 14), 0.3834} } ), /* Attempt to change column types. */ /* Note: "Customer ID" does not exist in the Source table, */ /* so this step fails. */ ChType_Default = Table.TransformColumnTypes( Source, { {"Date", type text}, {"Customer ID", Int64.Type}, {"Value", Percentage.Type} } ), /* Transform column types 3rd parameter accepts a Culture tag as text; "de-DE */ /* Culture affects formatting/interpretation of values such as numbers and dates */ ChType_Culture = Table.TransformColumnTypes( Source, { {"Date", type text}, {"Value", Percentage.Type} }, "de-DE" ), /* 3rd Parameter now also accepts a Record that may include a Culture and/ or MissingField. */ /* MissingField.UseNull > Adds missing columns to the output containing null values. */ /* In this case, "Customer ID" is added, filled with nulls. */ ChType_RecordA = Table.TransformColumnTypes( Source, { {"Date", type text}, {"Customer ID", Int64.Type}, {"Value", Percentage.Type} }, [Culture = "de-DE", MissingField = MissingField.UseNull] ), /* MissingField.Ignore > Ignores columns that don’t exist in the Source table, */ /* preventing errors by skipping any missing columns. */ ChType_RecordB = Table.TransformColumnTypes( Source, { {"Date", type text}, {"Customer ID", Int64.Type}, {"Value", Percentage.Type} }, [Culture = "de-DE", MissingField = MissingField.Ignore] ) in ChType_RecordB
Recent ideas
Power BI Report Builder - Difficult to Use and Ugly.
So I've definitely been spoiled in the modern age. So many apps that are integrated well with top-notch UI, and intuitive processes. Power BI Report Builder is surprisingly lacking in this. While I a...rs_rae4 hours agoAdvocate INew3Views0likes0CommentsIndividual L/R column borders for Matrix
Add Power BI feature for applying left and/or right borders to individual matrix columns, with customizable border thickness and color. This would let users visually group related measures, highlight...AaronReasoner8 hours agoNew MemberNew4Views0likes0CommentsSupport Git-Integrated Files in Fabric Workspaces
Overview Allow users to store and manage arbitrary files such as .md, .sql, .py, and .yml directly in a Fabric workspace, with built-in Git integration. Value This would keep documentation, SQL sc...ryomaru082512 hours agoAdvocate INew39Views4likes1CommentConsistent Locale Handling Across Power BI, Fabric, PowerPoint, and Subscriptions
Microsoft Fabric and Power BI should provide consistent locale handling across all user experiences. Today, locales such as German (Switzerland) are correctly respected in Power BI Desktop and the Po...Le_M14 hours agoRegular VisitorNew27Views2likes0CommentsIn Data Pipelines, Schedules should not be part of the definition
The request is to ensure Schedules are not included in the definition of a Data Pipeline for purposes of Deployment Pipelines. Today, when we deploy content across environments, the item frequent...schneiw14 hours agoAdvocate IVUnder Review814Views25likes3Comments