From the course: Power BI Data Methods

Unlock the full course today

Join today to access over 23,200 courses taught by industry experts.

Solution: Add a Date field

Solution: Add a Date field - Power BI Tutorial

From the course: Power BI Data Methods

Solution: Add a Date field

(upbeat music) - [Narrator] So how was your last challenge? Let's put that month field into good use by using it in a date formula. We don't have the day of the month at all, but we can instead use the placeholder day one inside the #date function. We'll create a new date field to reference the date formula. Inside the function, we'll reference the year, in the first parameter, followed by the month number, the month field in the second parameter, and we'll put a one in the third and final parameter to represent the first day of this respective month. Once we confirm this formula returns date values, let's then nest it inside the function Date.EndofMonth to move each of these new rows dates to the end of their respective month. We can also change the data type of our new date field. Lastly, we don't need the year, period, month name, and month in our table anymore, because the new date field represents these values. Finally, let's reorder the column, because I prefer the date field to…

Contents