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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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