From the course: Power BI Data Methods (2019)
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Creating date tables
- [Instructor] Date calendar tables are immensely useful in Power BI, and we can easily create them through custom M code. In the M language objects Power BI file, let's create a new list directly in the formula bar using a blank query. Let's put a date formula into the formula bar. To the "datetime date of the date time.local effects now. And hit enter. We get an error message when we try to create this list. Therefore, in order for this query to work, we need to use a work-around. In the same formula bar put "=1..100" and hit enter. This creates new list of contiguous numbers from 1 to 100. We convert this to a table, choose to use no delimiters. We then change the data type to date. Let's rename this column "dates" and the query "dates table". Now we need to make changes in the advanced editor window in the M Pub. Let's add a few extra rows in front of the source step. We set up the…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
-
-
-
(Locked)
Utilizing parameters3m 6s
-
(Locked)
Creating list objects4m 2s
-
(Locked)
Referencing a list as a column in a table3m
-
(Locked)
Leveraging record objects1m 49s
-
(Locked)
Leveraging list functions1m 57s
-
(Locked)
Creating date tables3m 3s
-
(Locked)
Looping with lists6m 34s
-
(Locked)
Combining list objects5m 36s
-
(Locked)
-
-
-