Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Multi Row formula to fill up

BRRLL99
11 - Bolide

Hi I have following data, 

 

RecordIDNameValue
1od z_ritmSD04567
1od z_aitmSD33358
1od z_qna1
1z_aitmSD09111
1z_qna1
1z_aitm2SD08111
1z_qna21
1z_aitm3DG00790
1z_qna31
1z_aitm4 
1z_qna4 
1z_aitm5 
1z_qna5 
1z_aitm6 
1z_qna6 
1Right_od z_aitmSD09898
1Right_od z_qna0.3
1Right_z_aitm 
1Right_z_qna 
1Right_z_aitm2 
1Right_z_qna2 
2od z_ritmSD04567
2od z_aitmSD33358
2od z_qna1
2z_aitmSD09111
2z_qna1
2z_aitm2SD08111
2z_qna21
2z_aitm3DG00790
2z_qna31
2z_aitm4 
2z_qna4 
2z_aitm5 
2z_qna5 
2z_aitm6 
2z_qna6 
2Right_od z_aitmSD09899
2Right_od z_qna0.25
2Right_z_aitmSD07777
2Right_z_qna1
2Right_z_aitm2 
2Right_z_qna2 

 

Expected Output: I need to fill values up based on record id

 

RecordIDNameValue
1od z_ritmSD04567
1od z_aitmSD33358
1od z_qna1
1z_aitmSD09111
1z_qna1
1z_aitm2SD08111
1z_qna21
1z_aitm3DG00790
1z_qna31
1z_aitm4SD09898
1z_qna40.3
1z_aitm5 
1z_qna5 
1z_aitm6 
1z_qna6 
1Right_od z_aitm 
1Right_od z_qna 
1Right_z_aitm 
1Right_z_qna 
1Right_z_aitm2 
1Right_z_qna2 
2od z_ritmSD04567
2od z_aitmSD33358
2od z_qna1
2z_aitmSD09111
2z_qna1
2z_aitm2SD08111
2z_qna21
2z_aitm3DG00790
2z_qna31
2z_aitm4SD09899
2z_qna40.25
2z_aitm5SD07777
2z_qna51
2z_aitm6 
2z_qna6 
2Right_od z_aitm 
2Right_od z_qna 
2Right_z_aitm 
2Right_z_qna 
2Right_z_aitm2 
2Right_z_qna2 
3 REPLIES 3
Yoshiro_Fujimori
15 - Aurora

Hi @BRRLL99 ,

 

Here is one potential solution.

 

Workflow

Yoshiro_Fujimori_0-1684066695906.png

 

Suggestion

I think there is a room for normalization in your table.

You may want to integrate those repetitive columns ("~aitm~" and "~qna~"), to make it First normal form ,

which will make your work easier. (e.g. The above struggle will not be necessary.)

 

BRRLL99
11 - Bolide

Hi Thank you very much for the quick response

As per your workflow this is my result

BRRLL99_0-1684068960260.png

 

But my expected output should be sequence number of previous column

 

RecordIDNameValue
1od z_ritmSD04567
1od z_aitmSD33358
1od z_qna1
1z_aitmSD09111
1z_qna1
1z_aitm2SD08111
1z_qna21
1z_aitm3DG00790
1z_qna31
1z_aitm4SD09898
1z_qna40.3
1z_aitm5 
1z_qna5 
1z_aitm6 
1z_qna6 
1Right_od z_aitm 
1Right_od z_qna 
1Right_z_aitm 
1Right_z_qna 
1Right_z_aitm2 
1Right_z_qna2 
2od z_ritmSD04567
2od z_aitmSD33358
2od z_qna1
2z_aitmSD09111
2z_qna1
2z_aitm2SD08111
2z_qna21
2z_aitm3DG00790
2z_qna31
2z_aitm4SD09899
2z_qna40.25
2z_aitm5SD07777
2z_qna51
2z_aitm6 
2z_qna6 
2Right_od z_aitm 
2Right_od z_qna 
2Right_z_aitm 
2Right_z_qna 
2Right_z_aitm2 
2Right_z_qna2 

 

Reason I'm asking for same sequence number is my end result is to create this output using crosstab

od z_ritmod z_aitmod z_qnaz_aitmz_qnaz_aitm2z_qna2z_aitm3z_qna3z_aitm4z_qna4z_aitm5z_qna5z_aitm6z_qna6
SD04567SD333581SD091111SD081111DG007901SD098980.3    
SD04567SD333581SD091111SD081111DG007901SD098990.25SD077771  
BRRLL99
11 - Bolide

Hi I have completed the logic in a static way at the end 

If you know any logic where I can dynamically change the column header names, Please let me know

Workflow has been attached, Please check

 

Labels