Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi,
I have tried converting my text to date by changing the Data Type formatting in the Column tools but just receive an error. See pic below.
I also tried to create a column with the following code and received an error.
Solved! Go to Solution.
I figured it out. I had to create an If statement to get rid of the 0s. Then I created another column with the following equation:
@Anonymous
If you want to take DAX approach: You need to use Date function and mentione year, month day.
DATE(
RIGHT([DateText],4),
LEFT([BOOJ30MF[Date],2),
MID([DateTest],3,2))
You can do in powerquery too, using Date.FromText
Hi @Anonymous
Use
FORMAT(table[col],"MMDDYYYY")
@ pranit828 - This still gives me an error 😕
Hi @Anonymous
What is the data type of [date] column?
you can use the below function instead.
DATE(RIGHT(BOOJ30MF[Date],4),LEFT(BOOJ30MF[Date],2),MID(BOOJ30MF[Date],3,2))
HI @Anonymous .
Try this formula:
Date = Date(LEFT(BOOJ30MF[BOOJRSDT],4),LEFT(BOOJ30MF[MMDD],2) ,RIGHT(BOOJ30MF[MMDD],2))
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @MFelix ,
I am receiving the error "An argument of the function 'DATE' has the wrong data type or the result is too large or too small."
Hi @Anonymous ,
I have test it out and everything is working correcty can you confirm the formula you are using please.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHI @Anonymous
One or both columns from which you are pulling the year, month and date is of text type.
Convert it to number and use the same formulate as in your screen shot
or use,
DATE(FORMAT(LEFT(BOOJ30MF[Date],4),"####"),FORMAT(LEFT(BOOJ30MF[MMDD],2),"##"),FORMAT(RIGHT(BOOJ30MF[MMDD],2),"##"))
@Anonymous
Still receiving the error 😕
Hi @Anonymous
Did you change the data type of both columns to number? looks like it is still text.
Also, Create this as a measure.
@Anonymous
Ok I changed both columns to "whole number" then tried to create the measure but it won't find the columns I am trying to pull in.
Hi @Anonymous ,
That's because you're creating a measure, please create a calculated column with below formula(just keep the data type of column BOOJRSDT and MMDD as Text) and set the date format for it in Column Tools ribbon.
Column = DATE(LEFT('BOOJ30MF'[BOOJRSDT],4),LEFT('BOOJ30MF'[MMDD],2),RIGHT('BOOJ30MF'[MMDD],2))Best Regards
Rena
@Anonymous
I did that and it still is giving me and error
I think there is an issue because the date field I am pulling in is coming from a database. I am trying to find a workaround but have been unsuccessful with everything I try.
I figured it out. I had to create an If statement to get rid of the 0s. Then I created another column with the following equation:
Hi @Anonymous
That type of information will not give you a date format you need to do the following:
Date = LEFT(BOOJ30MF[MMDD],2) &"/&RIGHT(BOOJ30MF[MMDD],2) & "/" & LEFT(BOOJ30MF[BOOJRSDT],4)
And then format the column as a date column.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em Português@ MFelix - I am getting the error "Cannot convert value "0/0/0" of type Text to type Date
Hi @Anonymous ,
Power BI doesn't recognise MMDDYYYY directly as a Date format. That's why you are not able to directly convert into date field.
Same is the issue when you use FORMAT function
Create a calculated column by splitting and joining existing column to have data in the format of a date(MM/DD/YYYY or DD/MM/YYYY or any other Date format).
Probably this new column will be of text data type but in Power BI recognizable date format, hence you will just need to convert this date data type.
Give a thumbs up if this post helped you in any way and mark this post as solution if it solved your query !!!
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 59 | |
| 43 | |
| 42 | |
| 23 | |
| 17 |
| User | Count |
|---|---|
| 190 | |
| 122 | |
| 96 | |
| 66 | |
| 47 |