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
Birch
Frequent Visitor

Can't get measure column to work!!!

Hi,

 

I can't get this to work (measure column)

 

Closed_last24hours = IF(OpportunitySet[Actual Close Date]>(NOW()-TIME(24;0;0));"YES";"NO")

 

But if I manual check, I have a coupels of YES's - but this says NO - What are I'm missing?

 

 

 

/Birch

1 ACCEPTED SOLUTION
Greg_Deckler
Super User
Super User

What are you trying to do with NOW()-TIME(24;0;0)? I ask because when I use that formula, I get, well, NOW(). If you are trying to subtract 1 day (24 hours), use NOW()-1


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

3 REPLIES 3
Greg_Deckler
Super User
Super User

What are you trying to do with NOW()-TIME(24;0;0)? I ask because when I use that formula, I get, well, NOW(). If you are trying to subtract 1 day (24 hours), use NOW()-1


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

Thanks - this did the trick 🙂

KHorseman
Community Champion
Community Champion

The hours argument of the TIME() function takes values between 0 and 23. Any number greater than 23 will be divided by 24 and the remainder will be used as the hours argument. 24 divides evenly into 24 with no remainder, so TIME(24,0,0) returns 0. TIME(23,59,59) returns 1 and would work in the original formula if you really want to use TIME() instead of just entering the number 1. In case anyone is wondering why the original approach didn't work.





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

Proud to be a Super User!




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.