Calculate previous 7 day average
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi . I want to calculate 7 days average based on Material Number, Plant and Posting_Dt. I have used below logic but it's not working as expected.
- Labels:
- Transformation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @AnanditaShankar, Average() isn't a function in Alteryx that can be used like this. For a case like this, just add them all together and then divide by 7, such as:
([Row-7:Daily Closing Stocks New]+[Row-6:Daily Closing Stocks New]....)/7
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Did that as well still not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@AnanditaShankar can you post what you're expecting in the outcome then? From what you were attempting originally, that's how you would do it in Alteryx, so if it's not working as expected then we'll need more detail around what is actually needed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
for eg : if on Day 1 closing stock is 200 and on Day 2 is 300 then average should be (200+300)/2 . And similarly it should do for consecutive days
