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.

Looping with lists

Looping with lists

From the course: Power BI Data Methods (2019)

Start my 1-month free trial

Looping with lists

- [Narrator] We want to create a new dates table and in order to do so we are going to use a few more helpful list functions. List.Generate creates a new list using loop logic. List.Sort puts a list in numerical order. And List.Combine creates a new list from two or more lists. In the M Language Objects Power BI file, we just created a dates table using list objects in the previous video. What if we want to create a date table, that only includes the pay cheque dates which occur every two weeks on a Friday? We first create a new group called Dates Testing, which we are going to add these queries to. We first create a reference date using a blank query. I'm going to turn the text value into a date value using the Date.From function. I know that August 23rd was a Friday. And I hit enter. I'm going to rename this query Reference Date. Now we go into create another new source and this time I'm going to use the List.Generate…

Contents