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.
@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?
Yes, that is correct Qiu.
Hi @Sravya9395 ,
Here is one way. I hope it helps.
1. Add a column to the schedule table as below.
Run Date | From | To |
2024-04-09 | 2024-04-01 | 2024-04-08 |
2024-04-16 | 2024-04-09 | 2024-04-15 |
2024-04-23 | 2024-04-16 | 2024-04-22 |
2024-04-30 | 2024-04-23 | 2024-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
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.
@Sravya9395
Similar thought with @Yoshiro_Fujimori
We can use the yxdb to store the "old" data and Union with the new one as below.