From the course: Power BI Weekly

Unlock this course with a free trial

Join today to access over 24,900 courses taught by industry experts.

Payroll dates table

Payroll dates table - Power BI Tutorial

From the course: Power BI Weekly

Payroll dates table

- [Instructor] Power query and the M language that runs behind the scenes within it can give us some fun challenges to solve. Here's one of them. Let's say that we want to create a dates table specifically for payroll dates. We start with a contiguous set of dates within a calendar month. Salary payroll occurs every two weeks on a continuous cycle on the same day of the week. Commissions and bonuses occur once a month on the first payroll date within that month. In Power BI desktop, let's first create a dates table of contiguous dates within a blank query. We'll then set it equal to the function list.dates. Within this list function, we'll set the start date to January 1st of 2023, using the syntax with the hash date function containing the parameters within it for the year, month, and day. In the consecutive years of 2023 and 2024 there are 365 days in the first year and 366 in the second year. So let's set the…

Contents