Forum Discussion
Klein_Hartje
4 years agoFrequent Visitor
How to compare two date columns in the same table using the operator Greater
Please I want to calculate this metric and it returns TRUE or FALSE:
Late Deliveries Flag = [Order Delivered Date to Customer] > [Order Estimated Delivery Date]
Hi:
If you do it as calculated columnin the same table where this info is:
Flag = IF(TableName[Order Delivered Date to Customer] < TableName[Order Estimated Delivery Date] ,"TRUE", "False")as a measure:Flag T/F =var orderdelivered = SELECTEDVALUE(TableName[Order Delivered Date to Customer)var estdeldate = SELECTEDVALUE(TableName[Order Estimated Delivery Date])returnIF(orderdelivered > estdeldate,"TRUE", "False")I hope this works for you. Thanks..
1 Reply
- Whitewater100
Solution Sage
Hi:
If you do it as calculated columnin the same table where this info is:
Flag = IF(TableName[Order Delivered Date to Customer] < TableName[Order Estimated Delivery Date] ,"TRUE", "False")as a measure:Flag T/F =var orderdelivered = SELECTEDVALUE(TableName[Order Delivered Date to Customer)var estdeldate = SELECTEDVALUE(TableName[Order Estimated Delivery Date])returnIF(orderdelivered > estdeldate,"TRUE", "False")I hope this works for you. Thanks..