Alteryx Designer Desktop Discussions

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

Alteryx Dynamic Date input.

Sravya9395
5 - Atom

Hello All,

 

I want to schedule the job to run  for every Tuesday to calculate the sum of sales for a store till(before day) i.e, Monday. 

While job runs every Tuesday it should append the store sales like shown in the output in the Alteryx DB history.

 

FYI  refer the attached input and output. 

 

 

Appreciate your help on this. 

Thank you.

6 REPLIES 6
Qiu
21 - Polaris
21 - Polaris

@Sravya9395 
Can you kindly clarify that

If your run the flow on 16th, April, you want to sale accumulated from 9th  April till 15th, April?

Sravya9395
5 - Atom

Yes, that is correct Qiu. 

Yoshiro_Fujimori
15 - Aurora

Hi @Sravya9395 ,

 

Here is one way. I hope it helps.

 

1. Add a column to the schedule table as below.

Run DateFromTo
2024-04-092024-04-012024-04-08
2024-04-162024-04-092024-04-15
2024-04-232024-04-162024-04-22
2024-04-302024-04-232024-04-29

 

2. Genereate a table with each date in any of the above period has one row.

3. Join the table in 2. with the Input table to determine which job date should count each sales.

4. Summarize.

 

Workflow

1269898_Workflow.png

Sravya9395
5 - Atom

Thanks for the reply, Yoshiro. 

Table 1 should have the future dates too. 

It is not limited to the input in the excel, it is just an sample data for a small period..

Indeed this should be applicable for future dates too. 

Like on 21st May( Tuesday) , it should run till 20 th May ( Monday). 

 

So this data range should be based on the current date. 

Some thing like dynamically inputting the value. 

Let me know if you have any additional questions. 

Yoshiro_Fujimori
15 - Aurora

Well if you run the job weekly, I would keep the output from the last week's job and append the output from this week's job.

Like below.

 

Workflow

1269898_2.png

Qiu
21 - Polaris
21 - Polaris

@Sravya9395 
Similar thought with @Yoshiro_Fujimori 
We can use the yxdb to store the "old" data and Union with the new one as below.

0507-Sravya9395.png

Labels