We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Dynamic working days as a denominator

HazemEita
5 - Atom

Hello!
So, I have a workflow that is using working as a denominator and I'm having an issue applying the same logic I have in excel

 

So, Today is 20240903 so working days considering only Sunday for us is considered a holiday, is 2

So, the number will be divided by 2 today but on next Monday denominator should be 6 and so on

I asked ChatGPT but the formula is not correct, so I need help please!!

 

Current formula for reference:


"[Vin Number] /
(
DateTimeDiff(DateTimeToday(), DateTimeFirstOfMonth(), 'days') + 1 -
(
Floor((DateTimeDiff(DateTimeFirstOfMonth(), DateTimeToday(), 'days')) / 7)
+ IIF(ToNumber(DateTimeFormat(DateTimeFirstOfMonth(), "%w")) = 0, 2, 10)
- IIF(ToNumber(DateTimeFormat(DateTimeToday(), "%w")) = 0, 1, 0)
)
)"

2 REPLIES 2
Raj
16 - Nebula

@HazemEita 
find the workflow attached
mark done if solved.

HazemEita
5 - Atom

Hi Raj thank you, i'll test it and mark solved if it works

Labels
Top Solution Authors