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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

IF date & time in column is greater than date and time in another column

Hey All

 

I am trying to find if someone has breached a SLA with customer action. 

 

I have a due date and time column and a completed date and time column 

Due DateCompleted Date
02/06/2020 17:00:0002/06/2020 16:45:00
02/06/2020 17:00:0002/06/2020 17:45:00

 

I want it to be conditional to find which rows have have a > Completed Date than Due Date.

It would also be good to be able to count and filter this. 

 

I can get it working for the date alone but not a date/time field. 

Would a new column be better? 

 

Any help would be appreciated. 

 

Thanks, Daniel.

1 ACCEPTED SOLUTION

HI @Anonymous ,

 

 

You can do this is Power Query too

 

Make sure your Data Type is Date/Time.

 

Create a Custom Column.

 

1.jpg

 

 

You can also create a Custom Column

Column = if ('Table'[Due Date] < 'Table'[Completed Date] , "true","false")

 

1.jpg

 


Regards,

Harsh Nathani


Appreciate with a Kudos!! (Click the Thumbs Up Button)

Did I answer your question? Mark my post as a solution!

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@Anonymous , Not sure I am clear

 

You can use this both measure or column

 

Table[Completed Date].date >Table[Due Date].date

 

measure = calculate(countrows(Table), filter(Table,Table[Completed Date].date >Table[Due Date].date))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Sorry I wasn't clear..

 

IF Due Date is < Completed date then 'true' else 'false'. It wont take into account the time only the date

HI @Anonymous ,

 

 

You can do this is Power Query too

 

Make sure your Data Type is Date/Time.

 

Create a Custom Column.

 

1.jpg

 

 

You can also create a Custom Column

Column = if ('Table'[Due Date] < 'Table'[Completed Date] , "true","false")

 

1.jpg

 


Regards,

Harsh Nathani


Appreciate with a Kudos!! (Click the Thumbs Up Button)

Did I answer your question? Mark my post as a solution!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.