web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Supply chain | Supply Chain Management, Commerce
Suggested answer

Advance filter on dates - (LessThanUtcNow()) but not blank

(5) ShareShare
ReportReport
Posted on by 83
Hello,
 
I am trying to apply an advance filter on confirmed receipt date for open purchase orders.
 
I want to apply both (LessThanUtcNow()) and is not blank. Otherwise, the (LessThanUtcNow()) filter alone will display blank values, which I do not want.
 
I have tried a few without success:
  • >01011900
  • !""
 
 
Any ideas?
 
Thank you in advance!
I have the same question (0)
  • Adis Profile Picture
    5,767 Super User 2025 Season 2 on at
    Advance filter on dates - (LessThanUtcNow()) but not blank
    Hi,
     
    Right from the gut I would try to apply the BETWEEN syntax => 01.01.1900..(LessThanUtcNow())
     
    I would also check:
    -if the two values work separately, ie. filter by no blanks OR (LessThanUtcNow()). Instead of using !"" or >01011900, try using a date before the first purchase order ever created in the system.
    -Instead of (LessThanUtcNow()), try using a date. Maybe the function works as a stand alone function but not in combination.
     
    Kind regards, Adis
     

    If this helped, please mark it as "Verified" for others facing the same issue

  • Laurens vd Tang Profile Picture
    3,658 Super User 2025 Season 2 on at
    Advance filter on dates - (LessThanUtcNow()) but not blank
    Good day,
     
    Could you try it with (LessThanUtcNow()) , !"" 
     
    Best regards,
    Laurens van der Tang
  • Suggested answer
    Mohamed Amine Mahmoudi Profile Picture
    26,356 Super User 2025 Season 2 on at
    Advance filter on dates - (LessThanUtcNow()) but not blank
     
    You need to use >T instead of (LessThanUtcNow()) because it also contains null values 
     
    Best regards,
    Mohamed Amine MAHMOUDI
  • Waed Ayyad Profile Picture
    8,973 Super User 2025 Season 2 on at
    Advance filter on dates - (LessThanUtcNow()) but not blank
    Hi,
     
    Can you tell me what is the data that you want to filter? for example, do you want to return records that have confirm receipt date > 1/1/1900? 
     
     
    Thanks,
    Waed Ayyad
     
  • jwell22 Profile Picture
    83 on at
    Advance filter on dates - (LessThanUtcNow()) but not blank
    Thanks all for your responses so far, but unfortunately none of the suggestions work.
     
    I'm still getting blank values come through.
     
    The data I'm trying to filter is on lines where the confirmed receipt date is:
    • A date in the past (not including today)
    • Not blank
  • Waed Ayyad Profile Picture
    8,973 Super User 2025 Season 2 on at
    Advance filter on dates - (LessThanUtcNow()) but not blank
    Hi,
     
    To be clear do you want to get all records < today () and not blank?
     
     
    Thanks,
    Waed Ayyad
     
     
  • jwell22 Profile Picture
    83 on at
    Advance filter on dates - (LessThanUtcNow()) but not blank
    That's right. So I want to see POs which are late.
  • Martin Dráb Profile Picture
    236,798 Most Valuable Professional on at
    Advance filter on dates - (LessThanUtcNow()) but not blank
    The problem with yours, lvdtang's and Mohamed's approaches is that they're combining the ranges with OR operator, not AND.
     
    A good approach may be creating a custom query range util method, similar to lessThanUtcNow(), but excluding empty values.
  • Suggested answer
    Mohamed Amine Mahmoudi Profile Picture
    26,356 Super User 2025 Season 2 on at
    Advance filter on dates - (LessThanUtcNow()) but not blank
     
    the first solution works very well for me.

    if not, I suggest this solution: put 1901 instead of 1900.
     
     
    Best regards,
    Mohamed Amine MAHMOUDI
  • jwell22 Profile Picture
    83 on at
    Advance filter on dates - (LessThanUtcNow()) but not blank
    This one is almost perfect, except I don't want to filter on today's date (T), instead I want yesterday.
    • The idea being that I capture POs that are "late"
    I have tried (Day(-1)) but this does not work either.
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

Leaderboard > Supply chain | Supply Chain Management, Commerce

#1
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 319

#2
Siv Sagar Profile Picture

Siv Sagar 196 Super User 2025 Season 2

#3
Sagar Suman Profile Picture

Sagar Suman 172 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans