Skip to main content
cancel
Showing results for
Search instead for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Frequent 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]

1 ACCEPTED SOLUTION
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])
return
IF(orderdelivered > estdeldate,"TRUE", "False")

I hope this works for you. Thanks..
1 REPLY 1
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])
return
IF(orderdelivered > estdeldate,"TRUE", "False")

I hope this works for you. Thanks..

## Helpful resources

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

#### Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

#### New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

Top Solution Authors
Top Kudoed Authors