Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Multi-row for YTD

sharmilaj
7 - Meteor

Hi all,

 

This is the my data 

DATEAMOUNT
31/08/2021100
31/10/2021500
30/04/2021300

 

Using multi row function need to create YTD column and do amount sum from start of the first month. 

 

Output required 

DATEAMOUNTYTD (amount * remaining months in year)
31/08/2021100100*4=400
31/10/2021500500*2=1000
30/04/2021300300*8=2400

kindly help build the flow using multi row function

4 REPLIES 4
caltang
17 - Castor
17 - Castor

What is the logic behind YTD * just amount? It doesn't make sense. 

 

Can you provide some more sample data + explanation? 

Calvin Tang
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
JosephSerpis
17 - Castor
17 - Castor

Hi @sharmilaj I mocked up an approach which achieves you desired output however uses datetime functions rather than a multi-row tool.

 

Datetimediff_27072023.JPG

flying008
15 - Aurora

Hi, @sharmilaj 

 

Maybe you can try is :

 

[AMOUNT] * (12- DateTimeMonth(TODATETIME(DateTimeParse([DATE],'%d/%m/%Y'))))
caltang
17 - Castor
17 - Castor

@sharmilaj I see that you’ve included the remaining months of the year as a requirement. I think @flying008 ‘s solution is a more efficient way.

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