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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
adamnimmo
Helper I
Helper I

View Upcoming Due Dates Only Weekdays

I am having some trouble with figuring out a formula to display my upcoming order due dates, specifically I want to view the next 5 order dates due but only if they fall on a weekday. I am also trying to build a column which shows all upcoming due dates for the next working week.

 



For the above, my due 1+ - 5+ would be returning M-F next week (10/30-11/3) as of today and on Monday 10/30 I would want to return T-M (10/31-11/6) and so on.

For the Upcoming week, I would be returning M-F (11/6-11/10) as of now, and advancing in a similar fashion as the Day 1+-5+>

Here is an example file - example.pbix 

Any and all help is greatly appreciated.

3 REPLIES 3
v-shex-msft
Community Support
Community Support

HI @adamnimmo,

 

You can try to use below measure to get Current weekday range and upcoming weekday range:

Current/Upcoming Week =
VAR temp = [PastDue_Adj]
VAR weekDay =
    WEEKDAY ( temp, 1 )
VAR CurrentWeek = temp + 7
    + ( 2 - weekDay )
    & "~"
    & temp + 7
    + ( 6 - weekDay )
VAR UpcomingWeek =
    TODAY () + 7
        + ( 2 - WEEKDAY ( TODAY (), 1 ) )
        & "~"
        & TODAY () + 7
            + ( 6 - WEEKDAY ( TODAY (), 1 ) )
RETURN
    IF ( temp <> BLANK (), CurrentWeek, IF ( [DeliveredLate] <> 1, UpcomingWeek ) )

3.PNG

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Thanks @v-shex-msft however it's not quite what I was hoping to achieve. Ideally I am wanting to only display in the Day 1-5 upcoming orders for weekdays and on the Upcoming Due display the upcoming weeks orders.

HI @adamnimmo,

 

Which date you used check as the condition to switch the date range? If you can please use the static date value. It may get the wrong result if you combine use multiple measures who contains specific filters.

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.