community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

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

Dynamic Rename Columns and sum data

Alteryx
Alteryx

Hi Eduardo,

 

I'm not exactly sure what you are trying to achieve. You want the dates to match the weeks? I see here that you have added columns with the dates. Are you trying to fill in all the dates between 11/18/2019 and 12/2 for example, and then count the number of weeks between both?

 

Thanks,

Deborah

Meteor

Hi @DeborahA ,

 

Correct, and divide the difference of weeks between both by the quantities (not considering columns names). The date always starts on Mondays. Please see below input and desired output:

 

Input:

RecordIDDATE WK 1DATE WK 2DATE WKS 3-5DATE WKS 6-10DATE WKS 11-14DATE WK 15Qty Week 1Qty Week 2Qty Weeks 3-5Qty Weeks 6-10Qty Weeks 11-14Qty Week 15
111/4/201911/11/201911/18/201912/2/201912/30/20191/6/2020560056001680016800168005600
211/4/201911/11/201911/18/201912/2/201912/30/20191/6/2020005400540005400
311/4/201911/11/201911/18/201912/2/201912/30/20191/6/2020000378600
411/4/201911/11/201911/18/201912/2/201912/30/20191/6/2020336038401344014400100803840
511/4/201911/11/201911/18/201912/2/201912/30/20191/6/20200000096
611/4/201911/11/201911/18/201912/2/201912/30/20191/6/2020068806880688006880
711/4/201911/11/201911/18/201912/2/201912/30/20191/6/202068801376034400344003440013760
811/4/201911/11/201911/18/201912/2/201912/30/20191/6/2020640064001280019200128006400
911/4/201911/11/201911/18/201912/2/201912/30/20191/6/20200000360000
1011/4/201911/11/201911/18/201912/2/201912/30/20191/6/20201120001120011200112000

 

 

Desired Output: 

RecordIDDATE WK 1DATE WK 2DATE WK 3DATE WK 4DATE WK 5DATE WK 6DATE WK 7DATE WK 8DATE WK 9DATE WK 10Qty Week 1Qty Week 2Qty Week 3Qty Week 4Qty Week 5Qty Week 6Qty Week 7Qty Week 8Qty Week 9Qty Week 10
111/4/201911/11/201911/18/201911/25/201912/2/201912/9/201912/16/201912/23/201912/30/20191/6/202056005600840084004200420042004200168005600
211/4/201911/11/201911/18/201911/25/201912/2/201912/9/201912/16/201912/23/201912/30/20191/6/20200027002700135013501350135005400
311/4/201911/11/201911/18/201911/25/201912/2/201912/9/201912/16/201912/23/201912/30/20191/6/20200000946.5946.5946.5946.500
411/4/201911/11/201911/18/201911/25/201912/2/201912/9/201912/16/201912/23/201912/30/20191/6/202033603840672067203600360036003600100803840
511/4/201911/11/201911/18/201911/25/201912/2/201912/9/201912/16/201912/23/201912/30/20191/6/202000000000096
611/4/201911/11/201911/18/201911/25/201912/2/201912/9/201912/16/201912/23/201912/30/20191/6/20200688034403440172017201720172006880
711/4/201911/11/201911/18/201911/25/201912/2/201912/9/201912/16/201912/23/201912/30/20191/6/2020688013760172001720086008600860086003440013760
811/4/201911/11/201911/18/201911/25/201912/2/201912/9/201912/16/201912/23/201912/30/20191/6/202064006400640064004800480048004800128006400
911/4/201911/11/201911/18/201911/25/201912/2/201912/9/201912/16/201912/23/201912/30/20191/6/202000000000360000
1011/4/201911/11/201911/18/201911/25/201912/2/201912/9/201912/16/201912/23/201912/30/20191/6/2020112000560056002800280028002800112000

 

Thank you!!


Eduardo

Meteor

Hi @DeborahA ,

 

Correct, and then divide the quantities by the number of weeks between both dates (consider dates instead of columns names). Please see new input and desired output:

 

Input:

RecordIDDATE WK 1DATE WK 2DATE WKS 3-5DATE WKS 6-10DATE WKS 11-14DATE WK 15Qty Week 1Qty Week 2Qty Weeks 3-5Qty Weeks 6-10Qty Weeks 11-14Qty Week 15
111/4/201911/11/201911/18/201912/2/201912/30/20191/6/2020560056001680016800168005600
211/4/201911/11/201911/18/201912/2/201912/30/20191/6/2020005400540005400
311/4/201911/11/201911/18/201912/2/201912/30/20191/6/2020000378600
411/4/201911/11/201911/18/201912/2/201912/30/20191/6/2020336038401344014400100803840
511/4/201911/11/201911/18/201912/2/201912/30/20191/6/20200000096
611/4/201911/11/201911/18/201912/2/201912/30/20191/6/2020068806880688006880
711/4/201911/11/201911/18/201912/2/201912/30/20191/6/202068801376034400344003440013760
811/4/201911/11/201911/18/201912/2/201912/30/20191/6/2020640064001280019200128006400
911/4/201911/11/201911/18/201912/2/201912/30/20191/6/20200000360000
1011/4/201911/11/201911/18/201912/2/201912/30/20191/6/20201120001120011200112000

 

Desired Output:

DATE WK 1DATE WK 2DATE WK 3DATE WK 4DATE WK 5DATE WK 6DATE WK 7DATE WK 8DATE WK 9DATE WK 10Qty Week 1Qty Week 2Qty Week 3Qty Week 4Qty Week 5Qty Week 6Qty Week 7Qty Week 8Qty Week 9Qty Week 10
11/4/201911/11/201911/18/201911/25/201912/2/201912/9/201912/16/201912/23/201912/30/20191/6/202056005600840084004200420042004200168005600
11/4/201911/11/201911/18/201911/25/201912/2/201912/9/201912/16/201912/23/201912/30/20191/6/20200027002700135013501350135005400
11/4/201911/11/201911/18/201911/25/201912/2/201912/9/201912/16/201912/23/201912/30/20191/6/20200000946.5946.5946.5946.500
11/4/201911/11/201911/18/201911/25/201912/2/201912/9/201912/16/201912/23/201912/30/20191/6/202033603840672067203600360036003600100803840
11/4/201911/11/201911/18/201911/25/201912/2/201912/9/201912/16/201912/23/201912/30/20191/6/202000000000096
11/4/201911/11/201911/18/201911/25/201912/2/201912/9/201912/16/201912/23/201912/30/20191/6/20200688034403440172017201720172006880
11/4/201911/11/201911/18/201911/25/201912/2/201912/9/201912/16/201912/23/201912/30/20191/6/2020688013760172001720086008600860086003440013760
11/4/201911/11/201911/18/201911/25/201912/2/201912/9/201912/16/201912/23/201912/30/20191/6/202064006400640064004800480048004800128006400
11/4/201911/11/201911/18/201911/25/201912/2/201912/9/201912/16/201912/23/201912/30/20191/6/202000000000360000
11/4/201911/11/201911/18/201911/25/201912/2/201912/9/201912/16/201912/23/201912/30/20191/6/2020112000560056002800280028002800112000

 

Thank you!!

 

Eduardo

Meteor

Hi @DeborahA ,

 

Correct, and then divided the quantities of this column by the number of weeks (not considering the column names to do the calculations, but the results of this division). Please see below another input and desired output:

 

Input:

RecordIDDATE WK 1DATE WK 2DATE WKS 3-5DATE WKS 6-10DATE WKS 11-14DATE WK 15Qty Week 1Qty Week 2Qty Weeks 3-5Qty Weeks 6-10Qty Weeks 11-14Qty Week 15
111/4/201911/11/201911/18/201912/2/201912/30/20191/6/2020560056001680016800168005600
211/4/201911/11/201911/18/201912/2/201912/30/20191/6/2020005400540005400
311/4/201911/11/201911/18/201912/2/201912/30/20191/6/2020000378600
411/4/201911/11/201911/18/201912/2/201912/30/20191/6/2020336038401344014400100803840
511/4/201911/11/201911/18/201912/2/201912/30/20191/6/20200000096
611/4/201911/11/201911/18/201912/2/201912/30/20191/6/2020068806880688006880
711/4/201911/11/201911/18/201912/2/201912/30/20191/6/202068801376034400344003440013760
811/4/201911/11/201911/18/201912/2/201912/30/20191/6/2020640064001280019200128006400
911/4/201911/11/201911/18/201912/2/201912/30/20191/6/20200000360000
1011/4/201911/11/201911/18/201912/2/201912/30/20191/6/20201120001120011200112000

 

Desired Output:

RecordIDDATE WK 1DATE WK 2DATE WK 3DATE WK 4DATE WK 5DATE WK 6DATE WK 7DATE WK 8DATE WK 9DATE WK 10Qty Week 1Qty Week 2Qty Week 3Qty Week 4Qty Week 5Qty Week 6Qty Week 7Qty Week 8Qty Week 9Qty Week 10
111/4/201911/11/201911/18/201911/25/201912/2/201912/9/201912/16/201912/23/201912/30/20191/6/202056005600840084004200420042004200168005600
211/4/201911/11/201911/18/201911/25/201912/2/201912/9/201912/16/201912/23/201912/30/20191/6/20200027002700135013501350135005400
311/4/201911/11/201911/18/201911/25/201912/2/201912/9/201912/16/201912/23/201912/30/20191/6/20200000946.5946.5946.5946.500
411/4/201911/11/201911/18/201911/25/201912/2/201912/9/201912/16/201912/23/201912/30/20191/6/202033603840672067203600360036003600100803840
511/4/201911/11/201911/18/201911/25/201912/2/201912/9/201912/16/201912/23/201912/30/20191/6/202000000000096
611/4/201911/11/201911/18/201911/25/201912/2/201912/9/201912/16/201912/23/201912/30/20191/6/20200688034403440172017201720172006880
711/4/201911/11/201911/18/201911/25/201912/2/201912/9/201912/16/201912/23/201912/30/20191/6/2020688013760172001720086008600860086003440013760
811/4/201911/11/201911/18/201911/25/201912/2/201912/9/201912/16/201912/23/201912/30/20191/6/202064006400640064004800480048004800128006400
911/4/201911/11/201911/18/201911/25/201912/2/201912/9/201912/16/201912/23/201912/30/20191/6/202000000000360000
1011/4/201911/11/201911/18/201911/25/201912/2/201912/9/201912/16/201912/23/201912/30/20191/6/2020112000560056002800280028002800112000

 

Thank you! 

 

Best regards,

 

Eduardo

Labels