0% found this document useful (0 votes)
5 views1 page

Generate Date Parameters in Power Query

The document outlines a script that generates a list of dates between a specified start and end date. It creates a table with various date-related columns, including year, month, quarter, week of the year, day, and names for each. The final output is a structured table with renamed columns for easier understanding.

Uploaded by

popkip03
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views1 page

Generate Date Parameters in Power Query

The document outlines a script that generates a list of dates between a specified start and end date. It creates a table with various date-related columns, including year, month, quarter, week of the year, day, and names for each. The final output is a structured table with renamed columns for easier understanding.

Uploaded by

popkip03
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

//parameters aanmaken voor start- en einddatum

let
Startdatum = #date(Startjaar,1,1),
Einddatum = #date(Eindjaar,12,31),
#"Aantal dagen" = [Link](Einddatum-Startdatum),
Datums = [Link](Startdatum,#"Aantal dagen"+1,#duration(1,0,0,0)),
#"Converted to Table" = [Link](Datums, [Link](), null,
null, [Link]),
#"Renamed Columns" = [Link](#"Converted to Table",{{"Column1",
"Datum"}}),
#"Inserted Year" = [Link](#"Renamed Columns", "Year", each
[Link]([Datum]), [Link]),
#"Renamed Columns1" = [Link](#"Inserted Year",{{"Year", "Jaar"}}),
#"Inserted Month" = [Link](#"Renamed Columns1", "Month", each
[Link]([Datum]), [Link]),
#"Renamed Columns2" = [Link](#"Inserted Month",{{"Month",
"Maand"}}),
#"Inserted Month Name" = [Link](#"Renamed Columns2", "Month Name",
each [Link]([Datum]), type text),
#"Renamed Columns3" = [Link](#"Inserted Month Name",{{"Month
Name", "Maand_naam"}}),
#"Inserted Quarter" = [Link](#"Renamed Columns3", "Quarter", each
[Link]([Datum]), [Link]),
#"Renamed Columns4" = [Link](#"Inserted Quarter",{{"Quarter",
"Kwartaal"}}),
#"Inserted Week of Year" = [Link](#"Renamed Columns4", "Week of Year",
each [Link]([Datum]), [Link]),
#"Renamed Columns5" = [Link](#"Inserted Week of Year",{{"Week of
Year", "Week"}}),
#"Inserted Day" = [Link](#"Renamed Columns5", "Day", each
[Link]([Datum]), [Link]),
#"Renamed Columns6" = [Link](#"Inserted Day",{{"Day", "Dag"}}),
#"Inserted Day Name" = [Link](#"Renamed Columns6", "Day Name", each
[Link]([Datum]), type text),
#"Renamed Columns7" = [Link](#"Inserted Day Name",{{"Day Name",
"Dag_naam"}})
in
#"Renamed Columns7"

You might also like