Alteryx Designer Desktop Discussions

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

Sum up values based on week ending date

keeprollin
7 - Meteor

Hello Community,

 

I have a date field, where Saturday and Sunday dates are rolled into Monday. I want to summarize the values based on each week's Friday Date. For example, my sample dataset is as given below:

DateValueDaysRolled Days
2021-01-021SaturdayMonday
2021-01-035SundayMonday
2021-01-0477MondayMonday
2021-01-0534TuesdayTuesday
2021-01-0624WednesdayWednesday
2021-01-0723ThursdayThursday
2021-01-0821FridayFriday
2021-01-0953SaturdayMonday
2021-01-1013SundayMonday
2021-01-1123MondayMonday
2021-01-1234TuesdayTuesday
2021-01-1312WednesdayWednesday
2021-01-1432ThursdayThursday
2021-01-1513FridayFriday

 

In the above table, I want to summarize the entire week's value with each week ending on Friday. This would add the values belonging to each week, i.e., '2021-01-02' to '2021-01-08' and so on. So my expected output would be:

DateSum_Value
2021-01-08185
2021-01-15180

 

So far I have been able to convert Dates to Days and then rolled up Saturday and Sunday into Monday. I have attached the sample workflow for reference. Can someone please help me with the solution?

2 REPLIES 2
BrandonB
Alteryx
Alteryx

You can use a multi-row tool to check if the previous row is a Friday and increment to the next week if so:

 

BrandonB_0-1657120541110.png

 

workflow attached

 

IraWatt
17 - Castor
17 - Castor

Hey @keeprollin,

Here is one way to do it:

IraWatt_0-1657121014738.png

You can create week groups using the multi row formula then summarize the groups using the summarize tool.

Any questions or issues please ask :)
HTH!
Ira

Labels