Hello,
Appreciate if you can help me because I am trying to filter the previous month data from 1 whole year data.
For example, this November, I need to pull the data from October only from column C.
And for the next month once I run the Alteryx in Dec, I need to get the Nov data only.
Please help. Thank you in advance
PS:
Here's the sample data set - how about when I run it again for Nov data, I need to manually change the filter to 11.
What I am trying to achieve is once I run the Alteryx from the production it will automatically pick up the month I needed. T
Thank you so much!
Company Code | Year | Month | name 1 | name 2 | volume | volume2 | Year |
PPPP | 2022 | 01 | 1111111 | NAME1 | 10 | 1 | Oct-22 |
PPPP | 2022 | 02 | 2222222 | NAME2 | 2 | 3 | Oct-22 |
PPPP | 2022 | 10 | 3333333 | NAME3 | 3 | 2 | Oct-22 |
PPPP | 2022 | 03 | 4444444 | NAME4 | 626 | 1 | Oct-22 |
PPPP | 2022 | 05 | 5555555 | NAME5 | 326 | 1 | Oct-22 |
PPPP | 2022 | 10 | 6666666 | NAME6 | 62 | 561 | Oct-22 |
PPPP | 2022 | 10 | 7777777 | NAME7 | 5 | 1 | Oct-22 |
Solved! Go to Solution.
Hi @gigi10
Please find another way to reach your solution.
Output:
Then filter your input to match this criteria and you can reach your desired output for every month dynamically.
Many thanks
Shanker V
Hi @gigi10
Step 1:
Step 2:
Step 3: This step helps to convert the previous month and year into the format which you have in the input dataset so that you can use the filter tool to filter all the records matching this criteria.
Kindly accept this solution if it provided a solution to your question.
Many thanks
Shanker V
Can you show me the formula please? Thank you so much!
Hi @gigi10
Complete workflow.
Step 1:
Step 2:
Step 3:
Run the workflow.
Output:
Many thanks
Shanker V
Hello Denis - thank you so much. Can I ask for your formula please?
Hey @gigi10
Lot's of solutions offered so far, my approach would be to use a filter tool with the following formula:
ToString([Year])+'-'+ToString([Month])
=
Left(DateTimeAdd(DateTimeToday(),-1,'month'),7)
This checks that the year and month (concatenated with a hyphen) are the same as the year and month of this day last month (e.g. "2022-10") for today's date.
Hope that helps,
Ollie
If I'm on the same page understanding your requirement, you can get the expected result using a filter tool. see the attached image.