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
smjzahid
Helper V
Helper V

Expression Error (Cannot convert the value of type date to text)

I have a and excel file with TEXT columns and date values have been stored in those columns. for eg:

 

Few of the cells have been formatted as type General (until 14/12/20) 

and anything after 14/12 is formatted as Customised. 

 

Power Query throws error fro this cell onwards (15/12) meaning from where the format is set to customised.

 

How do I resolve this error.

 

Note: This file is quite huge and I need to find a permanent solution via Power Query to handle this as every week the data will come out of the source system in this format only.

 

Please find the sample data below

 

02-Dec-20 A02-Dec-20 A03-Dec-20 A03-Dec-20 A07-Dec-20 A08-Dec-20 A08-Dec-20 A09-Dec-20 A10-Dec-20 A10-Dec-20 A10-Dec-20 A10-Dec-20 A11-Dec-20 A11-Dec-20 A11-Dec-20 A14-Dec-20*14-Dec-20*15-Dec-2015-Dec-2016-Dec-2016-Dec-2017-Dec-2017-Dec-2018-Dec-2018-Dec-2023-Dec-20 A05-Jan-2107-Jan-2107-Jan-2113-Jan-2113-Jan-2113-Jan-2113-Jan-2114-Jan-2115-Jan-2115-Jan-2115-Jan-2115-Jan-2125-Jan-2125-Jan-2125-Jan-2125-Jan-2126-Jan-2126-Jan-2126-Jan-2126-Jan-2128-Jan-2128-Jan-2128-Jan-2129-Jan-2129-Jan-2129-Jan-2102-Feb-2103-Feb-2103-Feb-2103-Feb-2103-Feb-2105-Feb-2109-Feb-2110-Feb-2112-Feb-2112-Feb-2116-Feb-2117-Feb-2117-Feb-2122-Feb-2122-Feb-2122-Feb-2122-Feb-2122-Feb-2122-Feb-2123-Feb-2123-Feb-2124-Feb-2124-Feb-2126-Feb-2126-Feb-2101-Mar-2101-Mar-2101-Mar-2102-Mar-2103-Mar-2103-Mar-2105-Mar-2108-Mar-2108-Mar-2108-Mar-2108-Mar-21

 

image.png

1 ACCEPTED SOLUTION
CNENFRNL
Community Champion
Community Champion

@smjzahid , you may want to try

Table.SelectRows(#"Added Index", each Date.From([Finish])>#date(2020,12,14))

Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

View solution in original post

1 REPLY 1
CNENFRNL
Community Champion
Community Champion

@smjzahid , you may want to try

Table.SelectRows(#"Added Index", each Date.From([Finish])>#date(2020,12,14))

Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

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.

Top Solution Authors