ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

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

7 Week Average

Anweinbe
7 - Meteor

Hi all, good morning!

 

I have data similar to what is attached, where I have a product as a row, and columns are my week end dates. I wanted to create a field that average the last 5 of the most recent dates. The problem is as I bring in new data, the most recent date headers will change. Is there a way to build a formula that is based on column order rather than a name?

 

As an FYI, I created the transpose in Alteryx. Prior to the transpose I have the data in Alteryx in a summarization. See tab 2 for that data in case its easier to work with that.

 

What would be even better is just a rolling 5 period average if that was possible. I am trying to determine sales trends.

 

Thanks so much!

3 REPLIES 3
Raj
16 - Nebula

@Anweinbe 
find the workflow attached.

mark done if solved.

Anweinbe
7 - Meteor

@Raj  I think this is close. My actual dataset has different products. Is there something we can add so that way when a new product appears it doesn't take values from a different product?

Raj
16 - Nebula

@Anweinbe just check on group by product in multirow formula tool.

hope this helps.

let me know if anything else.

Labels
Top Solution Authors