3 Replies Latest reply on Dec 27, 2018 7:56 PM by Ratna Sari

    Pivot Dynamic Column Name in Data Source

    Ratna Sari

      Hi All,

       

      I have data source in Excel file with dynamic column name:

      Example :

      For Year = 2018, the data source looks like this:   

      ItemJan-18Feb-18Mar-18Apr-18May-18Jun-18Jul-18Aug-18Sep-18Oct-18Nov-18Dec-18
      A122436485106127148169190211232
      B1336597129161193225257289321353

       

      For Year = 2019, the header of year and month column will change to be like this:

      ItemJan-19Feb-19Mar-19Apr-19May-19Jun-19Jul-19Aug-19Sep-19Oct-19Nov-19Dec-19
      A122436485106127148169190211232
      B1336597129161193225257289321353

       

      I need to pivot the data so the period (year and month) will become row:

      ItemPeriodValue
      AJan-181
      BJan-181
      AFeb-1822
      BFeb-1833

       

      When I used tableau to pivot the columns, it works but then when the data source year and month column change when there is year changes (from 2018 to 2019), it doesn't pivot the new year and month.

      Is there a way to handle this in tableau without writing ETL/script outside tableau to pivot the data

       

      Thanks,

      Ratna