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

General Discussions

Discuss any topics that are not product-specific here.

week day calculation if today is monday then pickup data from last Friday

Arvs
6 - Meteoroid

Dear All, trying to create formula- 

 

i need to  check entire row based on the previous date that is under " last updated"-

but if today is monday then  check date for last friday (excluding saturday and sunday)

2 condition :- 

trade status should be = open 

 

 

10 REPLIES 10
caltang
17 - Castor
17 - Castor

Hi @Arvs 

 

Some sample data will be helpful. In addition, kindly provide your expected output.

 

Otherwise we can only guess.

Calvin Tang
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
Arvs
6 - Meteoroid
Input data- date 24 July 2023     
PIDSIDlast updatedStatusSticpty 
45896-156821-Jul-23Expired5ABC 
58964-245821-Jul-23Open  4BBC 
78459-344420-Jul-23Exercised8CCC 
47895-155510-Jul-23Open  8VVV 
47895-466621-Jul-23Open  7DDD 
       
expected Output       
PIDSIDlast updatedStatusSticptyStatus
58964-245821-Jul-23Open  4BBCAmended
47895-466621-Jul-23Open  7DDDAmended

 

Condition 1- PID - last digit should be more than 1 (ex 44432-2, 789456-3 ,4412254 -4 so on )
Condition-2 -Status should be open
Condition-3 - last updated should be previous working day Ex- if I am running report on Monday (24 july 2023) so Alteryx should take data from last Friday that is 21 July 2023, if i am running report on Tuesday so Alteryx take date from Monday 
Condition 4 -Status appear "Amended"

 

Arvs
6 - Meteoroid

Hi sir, Kindly please help to assist on the above query - 

caltang
17 - Castor
17 - Castor

Sure, here you go:

 

image.png

 

Please note that you have two columns called "Status", so for your "Status" in the last column, I added a space like so -> "Status ".

 

Reason for doing so is because Alteryx can only have one unique field (column) name at a time in any dataset it shows or takes. So, to avoid the duplicate warning, I added the space to achieve your desired outcome.

 

Hope this helps! If it does, kindly mark this as the accepted solution so that others may benefit as well.

 

 

Thanks,

Cal

Calvin Tang
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
Arvs
6 - Meteoroid

Hello Sir, apologies keep coming-  last updated always change, if I am running report on Tuesday then alteryx should pickup previous day date from last updated, "if running report on Wednesday, Alteryx should take data from Tuesday ", if  Running Report on Thursday then Alteryx should take data from Wednesday".

later updated always chasing but rest of the condition still same - Status should be Open and last digit should be more than 1 (ex 44432-2, 789456-3 ,4412254 -4 so on ).

 

 

 

 

 if I am running report on Monday (24 july 2023) so Alteryx should take data from last Friday that is 21 July 2023, if i am running report on Tuesday so Alteryx take date from Monday 

ArnaldoSandoval
12 - Quasar

Hi @Arvs 

 

What would happen if:

  • The process is run on weekends, like Saturdays or Sundays?
  • Mondy is a holiday?
  • Wednesday is a holiday?

Those are valid scenarios as well, but you haven't described what to do when they happens; my question is to assist @caltang in getting the full requirements for this workflow.

 

Arnaldo

 

caltang
17 - Castor
17 - Castor

Yes, please answer @ArnaldoSandoval - this will help us understand your request better. From the looks of it, you want something dynamic and auto-calculated. 

 

What happens if you want a specific set of dates? Would an interface be of interest to you?

Calvin Tang
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
Arvs
6 - Meteoroid

We run the process only weekdays ..regard less of any holiday during weekdays except Saturday and sunday

caltang
17 - Castor
17 - Castor

Very well. Try v2 instead. @Arvs 

Calvin Tang
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
Labels
Top Solution Authors