Forum Discussion
Anonymous
4 years agoNot applicable
Cannot convert value '' of type Text to type Date
Hi All
I am converting field Text to Date by using Dax Function "DateValue" but i got above message could you please advice proper solution. In My table i have a data '#' in date column then i relpace as null value ,after that i applied Date value function getting issue
Anonymous , As per amitchandak suggestion you need to add column name in else condition so this would be your idea code as suggested.
Column = IF ( 'Table (2)'[Date] = BLANK () || 'Table (2)'[Date] = "#", BLANK (), DATEVALUE ( 'Table (2)'[Date] ) )Output:-
4 Replies
- amitchandak
Super User
Anonymous , Try a new column like
if([Date] ="" | | [Date] ="#", blank() , datevalue([Date]) )
- AnonymousNot applicable
Hi Amitchandak,
i appied the above syntax but getting empty data
- Samarth_18
Community Champion
Anonymous , As per amitchandak suggestion you need to add column name in else condition so this would be your idea code as suggested.
Column = IF ( 'Table (2)'[Date] = BLANK () || 'Table (2)'[Date] = "#", BLANK (), DATEVALUE ( 'Table (2)'[Date] ) )Output:-