Learn how to use Power Query to split date and time values into separate columns for easier data analysis.
This step-by-step guide will walk you through the process of transforming your date time data into a more usable format, saving you time and improving your data accuracy. If you prefer to use Excel functions, the technique is different.
Step 1: Load your dates to Power Query
Once your data are in a Table, you can load them to Power Query with the menu Data > From Table / Range
And then, in Power Query, you can visualize your data in Power Query
Step 2: Change the type of your data
As you can see on the header, you have the symbol ABC/123. That means Power Query considers your data as "Any"; not a text, not a date, not a number.
It's compulsory to change the type of your data to Date & Time
And then, the type of the data of your column is now "Date/Time" and the pictogram isn't the same
Step 3: Extract Date
Once the type of your data is Date and Time, it's very easy to extract the Date.
- Tab Add Column
- Then Date
- And finally Date Only
And the result is amazing; a new column with only the date
Step 4: Extract Time
Here, the technique is as simple as the previous step
- Select the column with Date and Time first
- Then, select the tab Add Column
- And Sub-Menu Time
- Finally, Time Only
And now, you have another column with the Time only
Using Power Query to split date and time values can greatly improve your data analysis and visualization in a Power BI project.
By transforming your data into a more usable format, you can gain deeper insights and make better-informed decisions.