cyfairmedicalpa
8 years agoNew Member
Status:
Needs Votes
Include MissingField Argument with Table.TransformColumnTypes Function for Power Query
From what I can see (and it's not listed in the M function reference) the built in Table.TransformColumnTypes doesn't accept the MissingField argument like most of the other Table functions. This is ...
m_dekorte
11 months agoResident 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
Allow External OneLake Data Shares to Be Accepted into Multiple Fabric Item Types
Fabric External Data Sharing provides an excellent zero-copy mechanism for sharing OneLake data across tenants. However, the receiving tenant currently has to accept the share into a Lakehouse. I w...Mourak10 hours agoNew MemberNew5Views0likes0CommentsAllow OneLake Shortcut Authentication Mode to Be Changed In Place
OneLake shortcuts support passthrough and delegated authentication, but changing the authentication model currently requires deleting and recreating the shortcut. I would like shortcut authenticatio...Mourak10 hours agoNew MemberNew7Views0likes0CommentsTenant-Wide OneLake Shortcut Lineage and Impact Analysis
This is grounded in a documented limitation: shortcut lineage is currently workspace-scoped, and Microsoft specifically says lineage for shortcuts to warehouses and semantic models isn't currently av...Mourak10 hours agoNew MemberNew12Views0likes1CommentAdd an End-to-End Production Reference Architecture for Microsoft Fabric Real-Time Intelligence
I would like to see a complete end-to-end Microsoft Fabric Real-Time Intelligence reference architecture that demonstrates how the individual RTI capabilities work together in a production-oriented s...Mourak10 hours agoNew MemberNew5Views0likes0CommentsImprove CI/CD consistency for Microsoft Fabric Real-Time Intelligence Eventstreams
Microsoft Fabric Real-Time Intelligence has made strong progress with Git integration and deployment pipelines, but lifecycle management can still be inconsistent across Eventstream sources, destinat...Mourak10 hours agoNew MemberNew3Views0likes0Comments