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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
dmouser
Frequent Visitor

Using Today () for duration of day

Hello, I have setup a formula to generate a category for completion deadlines based on time and date, relative to today.  However, using Today () in the formula appears to be keying off of today at midnight (mm/dd/yyyy 00:00:00).  Therefore, anything later than midnight today is showing up in the formula category beyond today. 

 

Suspense Category = IF('Main Working List'[Due to Requestor]=TODAY(),"Due Today",if('Main Working List'[Due to Requestor]<NOW(),"Overdue",if('Main Working List'[Due to Requestor]>NOW(),"Due This Week",BLANK())))

 

Here is a picture of my results.  As you can see, items schedule through today are coming up as Due This Week (which is true), but they're also due today.

 

submission_deadlines_example.PNG

 

 

 

 

 

 

Any ideas?  Do I need to add an additional IF clause that is >=Today()+1 somewhere?

1 ACCEPTED SOLUTION
dmouser
Frequent Visitor

Thank you @ChrisMendoza @Anonymous and @Anonymous for your replies.  I think I found another solution.  I modified the formula to read [Due to Requestor].[Date] = Today().  Adding the .[Date] appears to have forced the formula to render the correct results. 

View solution in original post

4 REPLIES 4
dmouser
Frequent Visitor

Thank you @ChrisMendoza @Anonymous and @Anonymous for your replies.  I think I found another solution.  I modified the formula to read [Due to Requestor].[Date] = Today().  Adding the .[Date] appears to have forced the formula to render the correct results. 

ChrisMendoza
Resident Rockstar
Resident Rockstar

@dmouser

 

If I understood your issue it is because TODAY( ) returns 8/7/2018 12:00:00 AM, correct?

 

You could try something like:

 

Column = DATE(YEAR(TODAY()),MONTH(TODAY()),DAY(TODAY()))&" "&TIME(23,59,59)

Then change the Data type to Date/Time and it should return 8/7/2018 11:59:59 PM.






Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

Proud to be a Super User!



Anonymous
Not applicable

Hey @dmouser

 

You can cast both your column and TODAY as dates to do your comparison. See picture:

 

IsToday.PNG

 

Hope this helps,

Parker

Anonymous
Not applicable

Hi @dmouser

 

Remember that Today () returns datetime value with the time "12:00:00 AM" always. Thats why its not matching any records with time beyond 12 am.  @Anonymous solution will work for you.

 

Thanks

Raj

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors