Let’s talk Alteryx Copilot. Join the live AMA event to connect with the Alteryx team, ask questions, and hear how others are exploring what Copilot can do. Have Copilot questions? Ask here!
Start Free Trial

Alteryx Designer Desktop Discussions

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

MTD and YTD based on today's date

JennyRuns24
8 - Asteroid

Hello Everyone,

 

I'm hoping someone can assist me with this. I'd like to add two new columns: MTD and YTD. The MTD column will be based on the month in which today's date falls, and the YTD column will be cumulative. For example, because today (1/30/2023) is in January, my MTD column would reflect January totals, and my YTD column would include January and February totals, as I am now reporting February actuals. Thank you!

 

JennyRuns24_0-1675071001248.png

 

6 REPLIES 6
ShankerV
17 - Castor

Hi @JennyRuns24 

 

Please use summarize tool, it will help

Then join the input data set with the output of summarize tool.

 

Many thanks

Shanker V 

ShankerV
17 - Castor

Hi @JennyRuns24 

 

Hope you are expecting the result like this.

 

ShankerV_0-1675071914847.png

 

Many thanks

Shanker V

binuacs
21 - Polaris

@JennyRuns24 One way of doing this with the dynamic select tool

 

binuacs_0-1675072625204.png

 

ShankerV
17 - Castor

Hi @JennyRuns24 

 

Step 1; Input

 

ShankerV_0-1675074489387.png

 

 

Step 2: 

ShankerV_1-1675074505798.png

ShankerV_2-1675074517780.png

 

Step 3;

ShankerV_3-1675074532180.png

ShankerV_4-1675074543160.png

 

Many thanks

Shanker V

 

 

ShankerV
17 - Castor

hi @JennyRuns24 

 

Step 4: Transpose tool

 

ShankerV_0-1675074591826.png

ShankerV_1-1675074608476.png

 

Step 5:

ShankerV_2-1675074634445.png

ShankerV_3-1675074641083.png

 

Step 6:

ShankerV_4-1675074660610.png

ShankerV_5-1675074675156.png

 

 

Many thanks

Shanker V

 

 

 

 

 

ShankerV
17 - Castor

Hi @JennyRuns24 

 

Step 7: Select tool

ShankerV_0-1675074720455.png

ShankerV_1-1675074735244.png

 

Step 8: 

 

ShankerV_2-1675074759287.png

 

 

Step 9:

ShankerV_3-1675074777353.png

 

 

Post run is the expected output:

ShankerV_4-1675074799410.png

 

Many thanks

Shanker V

 

 

 

 

 

 

 

 

Labels
Top Solution Authors