Forum Discussion

Mohamed_Kamel's avatar
Mohamed_Kamel
New Member
2 years ago

Pivoting Columns

I am trying to pivot 12 coloumns into two coloumns of Actual value and Target value. The thing is it is pivoted in two different raws, having 12 raws of actual then 12 raws of target. and it is annoying since I cant benifit from them being in the same raw to do comparisons. Here is the photo.

Please help me it is super important. I already do with th pivoting the "Don't aggregate" option.

 

Thanks in advance.

 

2 Replies

  • Daniel29195's avatar
    Daniel29195
    Community Champion

    Mohamed_Kamel 

     

    can you share the intial structure of your table with some dummy data. 

    that would be helpful

     

     

    best regards

    • Mohamed_Kamel's avatar
      Mohamed_Kamel
      New Member

      Hello,

      It is like this but much bigger, I first unpivot the months colouns then pivot the target actual so I have the coloumn of Months then Target Then actual. But then the Target and actual are separated in different coloumns like my first photo in the original post.

       

      Thanks a lot

       

       

      Source.Name.1KPI codeYear to day average.Target-ActualJanuaryFebruaryMarchAprilMayJuneJulyAugustSeptemberOctoberNovemberDecember
      Plant 1 L95Target555555555555
      Plant 1 L93Actual333333333333
      Plant 2L9156787Target14150127571449714389144001375514446603314313136791429010078
      Plant 2L9nullActual14106,81422015221,513816153711303413796,25634813369,51429200