Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
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.