Dataset with weeks as columns, need to pivot weeks into one column



How can i pivot a dataset which has the weeks as columns? I need to create one column with the weeks and the values within another column. This will enable me to provide charts more easily.

thanks for any ideas! i'm sure it's within redshift functionality, but i'm stuck.


Best Answer


  • Cartergan
    Cartergan Contributor

    In terms of pivot tables the only thing I found that worked well was a sumo card. It gives you the open to create pivot tables and move around what you want to pivot. I'm not sure if this is what you're looking for, but when I ran into something similar this card helped me achieve what I needed! 


    Let me know if you find anything else that works!



  • Godiepi
    Godiepi Coach
    Answer ✓


    Hi,  this is very simple to do in magic etl , take a look at link below for instructions on how to "Collapse Columns"


    it is in the knowledge base and here it is the link

    Domo Arigato!

    **Say 'Thanks' by clicking the thumbs up in the post that helped you.
    **Please mark the post that solves your problem as 'Accepted Solution'
  • debbie_a

    Thanks Godeipi! This was the perfect solution.

  • debbie_a

    Carter - thanks for the idea. Check out the solution from Goedipi, it worked really well!