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
Option to Stop Fabric Planning Billing Session After Plan Item Deletion
Currently, a Fabric Planning session remains active for 30 days once triggered. If a user creates a Plan item only for testing and deletes it the next day, the billing session still continues and c...v-dugumarrir134 minutes agoMicrosoft EmployeeNew18Views8likes0CommentsAllow selecting specific Fabric items to pull when using Update from Git
I’d like to suggest adding selective item deployment to Microsoft Fabric’s Update from Git experience. Today, when a Fabric workspace is connected to Git, Update from Git is primarily focused on syn...dprenc_elixirr2 hours agoAdvocate INew6Views0likes0CommentsDependency-aware Update from Git operations
I’d like to suggest improving Update from Git in Microsoft Fabric so that it becomes more dependency-aware during deployments. Git deployment can become fragile when multiple Fabric items depend on ...dprenc_elixirr2 hours agoAdvocate INew3Views0likes0CommentsAPI for Get Refresh Schedule of Dataflows
Currently, there is no way to get the actual refresh schedules of dataflows through the API. It is very important to see the coordination of dataflow and dataset refresh schedules. This seems like a...Andrew_Foulk23 hours agoNew MemberNew590Views28likes5CommentsExport Report Access Matrix for Workspace Admins
Title Allow Workspace Admins to Export Report Access and Permissions Without Tenant Admin Rights Product Microsoft Fabric / Power BI Service Business Need As a Workspace Administrator, I need a ...DonLloydLopez4 hours agoNew MemberNew5Views0likes0Comments