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

Alteryx Designer Desktop Discussions

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

Dynamic Formulas for creating an Average for multiple years

apatel1501
7 - Meteor

I have 10 years of revenue and quantity data for a particular product, I need to create a price column for each year.  The tricky part is - sometimes my data will have 2 years or 3 years or any number of years up to 10.  Is there a way to dynamically calculate price for each year that I may have data for without having to create a formula for each year and then disable certain years.

 

If a macro is a more viable solution - i'm open to that but i am very new to macros so i'm looking for a more non-macro way first that i could then evolve into a macro. But like i said - if macro is the only viable solution, that's okay.

 

Data attached. 

 

 

Thanks!

3 REPLIES 3
binuacs
21 - Polaris

@apatel1501 can you provide the expected output based on the input file you provided?

Christina_H
14 - Magnetar

Based on your screenshots, I think you want something like this?

image.png

image.png

apatel1501
7 - Meteor

this is exactly what i was looking for - thanks! very simple solution.

Labels
Top Solution Authors