Let’s talk Alteryx Copilot. Join the live AMA event to connect with the Alteryx team, ask questions, and hear how others are exploring what Copilot can do. Have Copilot questions? Ask here!
Start Free Trial

Alteryx Designer Desktop Discussions

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

Creating Formula for Sum Calculation

jakesten
5 - Atom

Hello!  I've been using Alteryx for about 3 months now and am still learning the ropes.  Unfortunately, I am having trouble creating a column with particular logic.

The scenario is this:
Each row in my data indicates the sum of 'Studio Hours' created on a given date that occurs in the same month.  The 'creation date' field represents the date the reservation was created, and the 'month of class date' field represents the month the reservation is set to occur.  The 'Studio Hours' column represents the duration of the reservation.  Every day, new reservations might be created, and existing reservations can be canceled.

The question I am trying to answer is: What is the total 'Studio hours' that have been reserved for  'Month of Class Date' as of (n) 'Creation Date'?  

Finished product would look like:

Studio IDProduct LineCreation DateMonth of Class DateSum_Studio HoursTotal Studio Hours for Month of Class Date
276364Soccer5/28/20205/1/202018140
276364Soccer5/29/20205/1/20204132
276364Soccer5/30/20205/1/20202134

 

 

Thanks in advance for your help!  I hope I am missing something simple here!

4 REPLIES 4
BrandonB
Alteryx
Alteryx

Are you looking for a running total within a given month as seen below? It also isn't clear how cancellations are represented. 

 

running total.png

jakesten
5 - Atom
It’s not quite a running total because the Total Studio Hours can drop from
one day to the next due to cancellations.

The logic for that final column should be the Sum of all Studio hours for a
month, that were created on or before the Creation Date in the same row.
Does that make sense? Apologies if it’s confusing.
--
Jake Stenberg
TOCA Football
C: (949) 629-5425

Sent from my iPhone, please excuse typos.
BrandonB
Alteryx
Alteryx

I think that is what the workflow I shared is doing above. It is a running total that groups by Studio ID, Product Line, and Month of Class Date. When the Creation date is sorted in ascending order, the sum will only be within the current month on or before the creation date.

BrandonB
Alteryx
Alteryx

Workflow is attached

Labels
Top Solution Authors