Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
Hi everyone,
I would like to calculate a Shipping Date (Deadline) for WebOrders adding the Shipping condition and skipping not working days like Weekend and Public Holidays.
Order Created Date | Shipping Condition | Shipping Date |
23/12/2022 | 48hrs |
In the Example above the order has been create on 23/12/2022 which is Friday so in this case I can consider 24hrs for the 23rd, then I will have to skip 24/12-25/12-26/12-/27/12 because them are public holidays so the actual Shipping date should be 28/12 EOD.
Any help please?
Solved! Go to Solution.
hi @Uspace87
Not sure if i fully get your, you may try to add a column like this:
EOD - NextWorkingDay =
VAR _date = [OrderDate]
RETURN
MINX(
FILTER(
data,
data[OrderDate]> _date
&& NOT WEEKDAY(data[OrderDate], 2) IN {6, 7}
&& NOT [OrderDate] IN VALUES(Holiday[Holidays])
),
data[OrderDate]
)
tried and it worked like this:
the holiday table:
hi @Uspace87
Not sure if i fully get your, you may try to add a column like this:
EOD - NextWorkingDay =
VAR _date = [OrderDate]
RETURN
MINX(
FILTER(
data,
data[OrderDate]> _date
&& NOT WEEKDAY(data[OrderDate], 2) IN {6, 7}
&& NOT [OrderDate] IN VALUES(Holiday[Holidays])
),
data[OrderDate]
)
tried and it worked like this:
the holiday table:
That is brilliant thank you, I had to add some other logic but that formula is perfect! Thank you very much!
Hi @Uspace87,
This is the DAX function you require: https://learn.microsoft.com/en-us/dax/networkdays-dax
Hope it helps.
User | Count |
---|---|
13 | |
10 | |
8 | |
7 | |
5 |
User | Count |
---|---|
24 | |
16 | |
15 | |
10 | |
7 |