Skip to main content
Post a question

Notifications

Community site session details

Community site session details

Session Id : HpzYeOwC4j+8ujHHAO+Mba
Small and medium business | Business Central, N...
Answered

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

Like (1) ShareShare
ReportReport
Posted on 22 Sep 2023 07:54:36 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 27 Sep 2023 at 10:00:31
    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,177 Super User 2025 Season 1 on 26 Sep 2023 at 08:05:00
    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,177 Super User 2025 Season 1 on 26 Sep 2023 at 07:45:33
    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
    324 on 25 Sep 2023 at 20:46:19
    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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March 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... 294,161 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,942 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans
Loading started