Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
norwor
Frequent Visitor

I want to convert text to date

norwor_0-1692093741462.png

Output: September 2023

Cannot convert value " of type Text to type Date.

How can i convert this to date

 

Thank you

8 REPLIES 8
Ahmedx
Super User
Super User

pls try DATEVALUE :

Intake Year = DATEVALUE(IF(........))
norwor
Frequent Visitor

Thanks for your respond but it still error

why do you have two month columns and two year columns
what do you want to end up with

write what is wrong , what is error
Or Share sample pbix file to help you

norwor
Frequent Visitor

Same context - Cannot convert value " of type Text to type Date.

why do you repeat the month and the year twice in a measure?
is this wrong or do you want to get a range or what?

norwor
Frequent Visitor

If country = "AU" year-1 else the same date as first that what i need

If (country = "AU" , DATE('table' [year]-1, 'table' [MONTH],1) , DATE('table' [year], 'table' [MONTH],1))

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.