Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Multiplying preceding rows by certain percentages

linusho
6 - Meteoroid

I have a list of dates and revenues but want to attribute a certain percentage of revenues to other dates. For instance:

 

Day 1:  5

Day 2:  10

Day 3:  10

Day 4:  5

 

Assuming that the day of should receive 50% of revenue, the day preceding should contribute 25%, and the 2 days preceding 25% the output would be:

 

Day 1: 2.5

Day 2: 7.5

Day 3: 8.75

Day 4: 7.5

 

How would I approach this? I have hundreds of rows of dates+revenues and am actually allocating to the 12 days preceding but haven't figured out a way to approach this problem. Thanks.

 

Attached another sample below for further clarification.

4 REPLIES 4
BrandonB
Alteryx
Alteryx

What do you do in cases where there is not a day preceding? This would result in 25% dropping off.

linusho
6 - Meteoroid

Ideally those would be null and I could just filter those dates out later but since the date window is static in this instance I could always just remove the affected values with a sample tool--inelegant but it works.

BrandonB
Alteryx
Alteryx

You should be able to use a multi row tool and set it up like this. Workflow is also attached. 

 

 

Multi Row.png

linusho
6 - Meteoroid

Doh! I totally forgot about the num rows option box. Thanks for the solution.

Labels