Free Trial

Alteryx Designer Desktop Discussions

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

transpose rows to columns, Repeated columns with different data

SamSurya
8 - Asteroid

Hi,

 

I have the below data for which I need to perform following task:

 

1. I need to transpose the rows to columns. Here, the first problem is few headers are repeating and may have different values. therefore, if I use unique tool it will make the rows unique with particular combination but how can I figure out which repeating header to come in the beginning section and which one comes in end section as data will keep on changing every month.Also, I need to maintain the order of the headers...Please note actual headers are different from the example.

2. I need to ensure that the totals for both the columns Header 24_Beginning Total (sum of Header 7 to Header 23) & Header 31_end Total (sum of Header25 to 23) should tally with sum of corresponding columns and yes keeping in consideration the repeating columns.

 

Your help will be greatly appreciated

 

Header 1JAN_2020FEB_2020MAR_2020APR_2020MAY_2020JUN_2020JUL_2020AUG_2020SEP_2020OCT_2020NOV_2020DEC_2020 
Header 23039.602175.603599.773602.573605.363608.163610.953613.743616.543619.333622.133623.94 
Header 3425.66436.37388.69388.69388.69388.69388.69388.69388.69388.69388.69388.69 
Header 4451.24451.24451.24451.24451.24451.24451.24451.24451.24451.24451.24451.24 
Header 50.000.000.000.000.000.000.000.000.000.000.000.00 
Header 60.000.000.000.000.000.000.000.000.000.000.000.00 
Header 723715.0424608.0025024.7122246.1122204.4822162.8522121.2322079.6022037.9721996.3521954.7221913.09 
Header 80.000.000.000.000.000.000.000.000.000.000.000.00 
Header 934.7734.7734.7734.7734.7734.7734.7734.7734.7734.7734.7734.77 
Header 105.595.595.595.595.595.595.595.595.595.595.595.59 
Header 1117.1947.4817.6417.3917.3917.3917.3917.3917.3917.3917.3917.93 
Header 12-99.37-47.92-97.19-99.37-99.37-99.37-99.37-99.37-99.37-99.37-99.37-152.99 
Header 130.000.000.000.000.000.000.000.000.000.000.000.00 
Header 14281.280.000.000.000.000.000.000.000.000.000.000.00 
Header 150.000.000.000.000.000.000.000.000.000.000.000.00 
Header 16653.50376.80-2739.410.000.000.000.000.000.000.000.000.00 
Header 170.000.000.000.000.000.000.000.000.000.000.000.00 
Header 180.000.000.000.000.000.000.000.000.000.000.000.00 
Header 190.000.000.000.000.000.000.000.000.000.000.000.00 
Header 200.000.000.000.000.000.000.000.000.000.000.000.00 
Header 210.000.000.000.000.000.000.000.000.000.000.000.00 
Header 220.000.000.000.000.000.000.000.000.000.000.000.00 
Header 230.000.000.000.000.000.000.000.000.000.000.000.00 
Header 24_Begining Total24608.0025024.7122246.1122204.4822162.8522121.2322079.6022037.9721996.3521954.7221913.0921818.39 Grand Total - sum(header7 to Header 23
Header 2527320.0027647.6027200.3125845.8825807.0525768.2125729.3825690.5525651.7225612.8825574.0525535.22 
Header 26264.2837.7638.4037.5837.5837.5837.5837.5837.5837.5837.5836.60 
Header 270.000.000.000.000.000.000.000.000.000.000.000.00 
Header 1117.1947.4817.6417.3917.3917.3917.3917.3917.3917.3917.3917.93 values for repeated columns can be same or different from the values in the beginning section
Header 12-99.37-47.92-97.19-99.37-99.37-99.37-99.37-99.37-99.37-99.37-99.37-152.99
Header 13-1.00-1.00-1.00-1.00-1.00-1.00-1.00-1.00-1.00-1.00-1.00-1.00
Header 286.576.576.576.576.576.576.576.576.576.576.576.57
Header 29139.92-490.17-1318.850.000.000.000.000.000.000.000.000.00
Header 170.000.000.000.000.000.000.000.000.000.000.000.00
Header 180.000.000.000.000.000.000.000.000.000.000.000.00
Header 300.000.000.000.000.000.000.000.000.000.000.000.00
Header 210.000.000.000.000.000.000.000.000.000.000.000.00
Header 220.000.000.000.000.000.000.000.000.000.000.000.00
Header 230.000.000.000.000.000.000.000.000.000.000.000.00
Header 31_end Total27647.6027200.3125845.8825807.0525768.2125729.3825690.5525651.7225612.8825574.0525535.2225442.33 Grand Total  - sum(header25 to Header 23)
Header 320.06 %(0.06 %)0.95 %0.95 %0.95 %0.95 %0.95 %0.95 %0.95 %0.95 %0.95 %0.95 % 
Header 330.26 %0.20 %1.15 %1.15 %1.15 %1.15 %1.15 %1.15 %1.15 %1.15 %1.15 %1.15 % 

 

8 REPLIES 8
fmvizcaino
17 - Castor
17 - Castor

Hi @SamSurya ,

 

What exactly do you need to transpose? Do you need the months as rows ?

Would you be able to build a small sample of your desired output?

 

Also, I suggest you to not flood the community with the same question multiple times as this makes all other important questions disappear from first page as well.

 

Best,

Fernando Vizcaino

SamSurya
8 - Asteroid

 

 
 
 
, I want to transpose rows to columns  A. 
without clubbing the duplicate rows B. in the next part I need to rename the headers  C. I need to verify that grand totals=sum of headers (separately)
 
 
 I want something like below:                                                                                                                                                                                                                                                                                                                                                
 Header 1  Header 2  Header 3  Header 4  Header 5_Total(2+3+4)  Header 6  Header 3  Header 4  Header 7_Total (6+3+4) 
 JAN_2020               3,040                    426                       -                3,465            23,715                  426                (451)            23,689
 FEB_2020               2,176                    436                       -                2,612            24,608                  436                (451)            24,593
 MAR_2020               3,600                    389                       -                3,988            25,025                  389                (451)            24,962
 APR_2020               3,603                    389                       -                3,991            22,246                  389                (451)            22,184
 MAY_2020               3,605                    389                       -                3,994            22,204                  389                (451)            22,142
 JUN_2020               3,608                    389                       -                3,997            22,163                  389                (451)            22,100
 JUL_2020               3,611                    389                       -                4,000            22,121                  389                (451)            22,059
 AUG_2020               3,614                    389                       -                4,002            22,080                  389                (451)            22,017
 SEP_2020               3,617                    389                       -                4,005            22,038                  389                (451)            21,975
 OCT_2020               3,619                    389                       -                4,008            21,996                  389                (451)            21,934
 NOV_2020               3,622                    389                       -                4,011            21,955                  389                (451)            21,892
 DEC_2020               3,624                    389                       -                4,013            21,913                  389                (451)            21,851
fmvizcaino
17 - Castor
17 - Castor

Hi @SamSurya ,

 

Don't worry about it. I've just noticed that the community has been updated and is experiencing a lot of issues regarding the posts.

 

I'm attaching an example showing how to get everything done. Workflow attached as well.

fmvizcaino_0-1591674432639.png

 

Best,

Fernando Vizcaino

 

SamSurya
8 - Asteroid

Many Thanks Fernando.... simply Brilliant :)...

 

just one thing left as how can i build a control to check, if grand totals are matching up with sum of associated columns.

 

very much appreciate your help ... cheers!!!

fmvizcaino
17 - Castor
17 - Castor

Hi @SamSurya ,

 

I created a parallel process in your workflow to verify the totals for each month.

 

 

Best,

Fernando Vizcaino

SamSurya
8 - Asteroid

Thanks Fernando,

 

Actually, I need to sum group wise i.e. as per my later example:

 

I need to divide my table into two groups and check following:

 

1. if Header 5_Total = Header 2 +Header 3 +Header 4 then "Matching" else "Not Matching"

2. if Header 7_Total = Header 6+Header 3 +Header 4 then "Matching" 

else "Not Matching"

 

 

 

 

fmvizcaino
17 - Castor
17 - Castor

Hi @SamSurya ,

 

Example attached.

 

Best,

Fernando V.

SamSurya
8 - Asteroid

thanks Fernando... really helps me

Labels
Top Solution Authors