Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

BC Date filter to always show yesterday but exclude weekends (Monday's yesterday is friday)

(1) ShareShare
ReportReport
Posted on by 19
Not sure this is possible but chekcing here if anyone has a simple solution.  Trying to use a standard date filter that always show yesterday but exclude weekends (Monday's yesterday is friday).
 
example -1d<>WD6|WD7
  • jk12984 Profile Picture
    19 on at
    BC Date filter to always show yesterday but exclude weekends (Monday's yesterday is friday)
    Thanks Kaspars!  I'll give that a try.  Joe
  • Verified answer
    KasparsSemjonovs Profile Picture
    4,117 Super User 2025 Season 1 on at
    BC Date filter to always show yesterday but exclude weekends (Monday's yesterday is friday)
    Actually gave it some more thought and I think this filter could work - at least it works on my tests :)
    -3D&<>-WD1&<>-WD2&<>-WD3&<>-WD4&<>-WD6&<>-WD7|-1D&<>-WD6&<>-WD7

    or to make this shorter:
    -3D&-WD5|-1D&<>-WD6&<>-WD7
     
     
    It filters on -3D but shows it only if it is last friday, and it filters on -1D and hides last saturday and last sunday.  So on Sunday You will not get anything shown. If You need on Sunday to also show Friday, then use this:
    -3D&-WD5|-1D&<>-WD6&<>-WD7|-2D&-WD5
  • Suggested answer
    KasparsSemjonovs Profile Picture
    4,117 Super User 2025 Season 1 on at
    BC Date filter to always show yesterday but exclude weekends (Monday's yesterday is friday)
    Current filter has several wrongs in it:
    WD6 and WD 7 returns current week's 6th and 7th day, so on monday it will check if it is not next saturday/sunday. So You would need to add a minus sign -so it is previous week "-WD6"   will give last saturday. 
    Correct version of your filter would be "-1D&<>-WD6&<>-WD7"  , but this will work on Tuesday to Saturday. But for Sundays and Mondays this would just return an empty list and You would need a filter "-3D&<>-WD6&<>-WD7". There is no option to have conditions or IF in filters, therefore I don't think this is possible with standard options. 
     
     
    A customization would require to check the current day and apply filter based on result - either -1D on tuesday till saturday, -2D on Sundays and -3D on mondays.
     
     
  • Brett F Profile Picture
    221 on at
    BC Date filter to always show yesterday but exclude weekends (Monday's yesterday is friday)
    I would like to know if this is possible as well.  Nothing I've tried has worked.

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,245 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,925 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans