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.

Formatting times

Formatting times - Power BI Tutorial

From the course: Power BI Weekly

Formatting times

- [Instructor] Power BI with DAX stores days and whole number increments and times as decimals within each day. We can convert between decimals and times in a few different ways. We can convert it with the help of the DAX format function. We can set it up using dynamic measure string formatting, and we can create time data types using the Time DAX function. We can check out different DAX format functions for time on its eponymous DAX documentation page. We'll set up our first formula using the short date as our time format within the format function. This gives us a time with a leading zero. If we did not want to include this and denote the time with a.m. and p.m., we can set this up using the format function in another way. Instead of short day, we'll input h;nn for the minutes, followed by AMPM in the second function parameter. We'll follow the same steps for the sunset time as well, and I'm just going to be consistent with…

Contents