Forum Discussion
Incorrect Results using DAX
HotChilli Thanks for your contribution on this thread.
Hi vtilokani ,
As HotChilli refered, the problem may be caused by the data type of field [order_delivered_customer_date] and [order_estimated_delivery_date]. Please update the formula of measure as below and check if it can return the expected result:
Delivery Status =
IF (
AND (
'Nexusgoods_orders_dataset (1)'[order_status] = "delivered",
DATEVALUE ( 'Nexusgoods_orders_dataset (1)'[order_delivered_customer_date] )
> DATEVALUE ( 'Nexusgoods_orders_dataset (1)'[order_estimated_delivery_date] )
),
"Delayed",
"Ontime"
)
If the above one can't help you get the expected result, could you please provide some sample data in these two fields with Text format? Thank you.
Best Regards
hello folks,
I tried using the query that you had suggested but it doesn't work. I'm getting the following error "Cannot convert value '' of type Text to type Date."
I've attached a spreadsheet link along with some sample dataset for your reference. Please help. https://docs.google.com/spreadsheets/d/19h8jUscm4Zy10o2E_SsLCDbwnfuBU_tRw2jZtuJM9vY/edit?usp=sharing
- vtilokani2 years agoRegular Visitor
I'm sorry. I forgot to mention that I've copied this data from the csv file that I had used to import data in to power BI.