Forum Discussion
Issues to convert data type text to date
- 8 years ago
Hi anis_keyna,
From the error message, the STATUS is a measure instead of calculated column, right?
You need to use aggregate function in the measure eg: MAX()
STATUS=IF(MAX('Shipment Planning'[ACT_MVT_DATE])<>BLANK(),"3",
IF(MAX('Shipment Planning'[CONT_NO])<>BLANK(),"2",
IF(MAX('Shipment Planning'[CONT_NO])=BLANK(),"1")))If you create a calculated column, then it's fine to use your own DAX. Please refer to this blog:https://www.sqlbi.com/articles/calculated-columns-and-measures-in-dax/
In Power BI desktop, to convert TEXT date value to DATE type, you can select the date column, then click below option:
Best Regards,
Qiuyun Yu
Hi anis_keyna,
From the error message, the STATUS is a measure instead of calculated column, right?
You need to use aggregate function in the measure eg: MAX()
STATUS=IF(MAX('Shipment Planning'[ACT_MVT_DATE])<>BLANK(),"3",
IF(MAX('Shipment Planning'[CONT_NO])<>BLANK(),"2",
IF(MAX('Shipment Planning'[CONT_NO])=BLANK(),"1")))
If you create a calculated column, then it's fine to use your own DAX. Please refer to this blog:https://www.sqlbi.com/articles/calculated-columns-and-measures-in-dax/
In Power BI desktop, to convert TEXT date value to DATE type, you can select the date column, then click below option:
Best Regards,
Qiuyun Yu
Thanks ! Its working now