Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

column management

I am definitely a PQ newbie.  Got an ugly dataset with 70+ rows.  A Spend, A Rotation, A Creative,  B Spend, B Rotation, B Creative... B2 Spend, B2 Creative, B2 Rotation, etc....  have no idea how th...
  • Anonymous's avatar
    Anonymous
    7 years ago

    Thanks Stachu.       I appreciate the function showing the way to loop thru columns to get renamed  headers.  Renaming columns is common need here so that will definitely be useful.   The merge table is something I never considered. 

    This month's version has to be distributed today so I am going with the merged  table option this round.  Beyond just merging the table to get all column headers, I wasn't sure how to get headers back in play.  The join gets my column headers back to full dataset in proper order.     I need to tweak solution just a bit to add conditional column that tests header name and order between Defined_Cols and Cols_InCurrFile. I realize the join could either allow all cols to show up or just those from defined list but my next step is joining fields together.  Need to see what is off and decide whether new info needs to be included, excluded or reordered.   Defined_Cols will be static but editable table for user.    Then concatenate based on data pattern. There are 6 columns in each column grouping, 4 cols are sequential plus column 63 and last column, except last group which is all sequential.    

     

    Thank you for two awesome solutions.

    T