Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi Guys,
I have a small issue in my current dataset. The value of the column IDT_DTM_ID consist a wrong date value. Check the image here below.
I would like to transform 20170102 into a date type 02-01-2017.
Can you help me out?
Kind regards,
Rega
Solved! Go to Solution.
In the Query Editor, you can click on the Transform tab, then the Data Type dropdown and select Date.
If that doesn't work then maybe regional date settings are messing it up (Power BI might expect year, day, month instead of year, month, day) .
If so, you can try extracting data into three new columns, then merging them back together into a date format that Power BI can recognize. For example:
1. Click Add Column tab and select Extract > Range and set Starting Index to 4 and Number of Characters to 2. That will get you the month in its own column
2. Select Extract > Last Characters and set Count to 2. That will get you the day.
3. Select Extract > First Characters and set Count to 4. That will get you the year
4. Click the Transform tab. Select the three new columns and click Merge Columns and set the separator to Custom, use a hyphen as the separator, then enter a column name
5. Finally change the Data Type to Date.
(If this doesn't work, go back to step 2 and swap the order of the day and month columns and try again)
Convert the date int into text and from text into date with the following function combination.
Date.From( Text.From( [Date_Int_Column] ) )
In the Query Editor, you can click on the Transform tab, then the Data Type dropdown and select Date.
If that doesn't work then maybe regional date settings are messing it up (Power BI might expect year, day, month instead of year, month, day) .
If so, you can try extracting data into three new columns, then merging them back together into a date format that Power BI can recognize. For example:
1. Click Add Column tab and select Extract > Range and set Starting Index to 4 and Number of Characters to 2. That will get you the month in its own column
2. Select Extract > Last Characters and set Count to 2. That will get you the day.
3. Select Extract > First Characters and set Count to 4. That will get you the year
4. Click the Transform tab. Select the three new columns and click Merge Columns and set the separator to Custom, use a hyphen as the separator, then enter a column name
5. Finally change the Data Type to Date.
(If this doesn't work, go back to step 2 and swap the order of the day and month columns and try again)
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
72 | |
70 | |
37 | |
29 | |
26 |
User | Count |
---|---|
91 | |
49 | |
44 | |
38 | |
37 |