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!Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.
Hello,
firste question : quickly generate year, quarter, month, and day columns for each date in a power query table.
I have several dates in different tables (one hundred).
Second question: Is it possible for each table to create the 4 columns in a single step?
here there is no question of creating a date table. I just need to split each date into four columns.
Best regards
Hello, @hi_world
let
tbl = #table({"date_column"}, {{#date(2023, 03, 11)}, {#date(2023, 03, 23)}}),
new_columns =
Table.ExpandRecordColumn(
Table.TransformColumns(
tbl,
{"date_column",
each Record.AddField(Date.ToRecord(_), "Quarter", Date.QuarterOfYear(_))}
),
"date_column",
{"Year", "Quarter", "Month", "Day"}
)
in
new_columns
Hello @AlienSx ,
Thank you ! it works fine in import mode but it does not work in my use case because i'm using direct query mode.
Do you have any way to do that in DirectQuery ?
Best regards
@hi_world , nope, sorry. This is what MS site says:
If the Power Query Editor query is overly complex, an error occurs. To fix the error, you must either delete the problematic step in Power Query Editor, or switch to import mode. Multidimensional sources like SAP BW can't use the Power Query Editor.