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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
ashokpasumarthi
New Member

HardCoded date to datatype Date conversion using dax.

I am looking to convert a hardcoded date ex : "1900-1-1" to datetime. How can i do it using dax. Basically I am using something like below.

 

IF(Condition,table(column)(datetime) ,"1900-1-1")

I am getting error because 1900-1-1 is considered as text and my true condition column in IF is datetime. How to handle this in DAX ? Thanks for looking 

1 REPLY 1
Anonymous
Not applicable

hI,

 

USE FORMAT function in dax to achieve your goal. however, you can use Edit quries (on the top tab)

and then in there, select the column you like to change the data type and then go to tansform (on top tab).

there you will find a option called data type. change this you either Date/Tine or Date according t your requirement

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.