Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

add rows below based on the req calculated

moinshaik
7 - Meteor

I have a input data with the name and the week wise details as below.

 

NameWeek 1Week 2Week 3Week 4Week 5Week 6Week 7Week 8
A5021120123300322.0123.0345.0
B602270340200322.0322.0111.0
C706050234350233.0257.0222.0

 

and I need the output as below where in first it should calculate the R weeks which is requirement i.e every week needs to be divided by 40 and rounded to nearest digit. the formula is round(weeks/40) this applies to all the week columns and then based on all the weeks calculated wherever we has the highest requirement those no. of rows needs to be created. If the requirement is zero for all the rows then the minimum of 2 rows should get created as the week hours might be below 40 because of which it is coming zero. Please find the below output which I am expecting with the R weeks calculated and the rows created with the name.

 

NameWeek 1Week 2Week 3Week 4Week 5Week 6Week 7Week 8 R Week 1R Week 2R Week 3R Week 4R Week 5R Week 6R Week 7R Week 8
A5021120123300322.0123.0345.0 11338839
B602270340200322.0322.0111.0 21295883
C706050234350233.0257.0222.0 22169666
                  
A                 
A                 
A                 
A                 
A                 
A                 
A                 
A                 
A                 
B                 
B                 
B                 
B                 
B                 
B                 
B                 
B                 
B                 
C                 
C                 
C                 
C                 
C                 
C                 
C                 
C                 
C                 
2 REPLIES 2
jamielaird
14 - Magnetar

Hi @moinshaik ,

 

(I've flagged your question to be moved to the Designer Discussions forum.)

 

Here's a workflow that achieves the result you are looking for:

 

Spoiler
jamielaird_0-1624528092762.png

 

Hope that helps and let me know if you have any questions.

 

Jamie

moinshaik
7 - Meteor

Awesome this is what I am looking for. Thank you so much. Also is there a way where we can updated the requirement hours like below. It needs to be updated for all the generated rows

 

NameWeek 1Week 2Week 3Week 4
A5021120123
B602270340
C706050234
  If it is less than 50 then divide the requirement by 2. otherwise it should be 45
A25104545
A25114545
A003033
A0000
A0000
A0000
A0000
Labels