Dynamic Date Table using Power Query in Power BI
Hello friends!! We’ll be learning how to create the dynamic date table using Power Query in Power BI. This tutorial will help to create dynamic date table in Power BI using Power Query. Easy and quick tutorial to follow.
Sales Table
Here is sales table I have in my Power BI.
Start Date and End Date Table
StartDate and EndDate will be created to find the first and last date from the data. Go to New Source > Bank Query and create tables using following formula
#StartDate = #"Date.StartOfYear"(List.Min(SalesTable[SalesDate]))
#EndDate = #"Date.EndOfYear"(List.Max(SalesTable[SalesDate]))
Date Table creation
= {Number.From(#"StartDate")..Number.From(#"EndDate")}
Once the table is created, follow the steps below
- Transform > To Table and it will create the table.
- After that change the data type to date
- Go to Add Column > Date > Year/Month/Day to add the columns and that’s done.
Keep visiting Analytics Tuts for more tutorials.
Thanks for reading! Comment your suggestions and queries
Hi I want to add range using start date and end date both please let me know the possible way