Forum Discussion

avulasandeep's avatar
avulasandeep
Icon for Helper III rankHelper III
7 years ago

is there any option for columns adding dynamically to pivot Table?????

HI developers ,

 

Here is my question is that related to the Unpivot the Columns ., 

 

is there an option for the dynamically adding a new column to the already existing unpivot columns ???

if YES Can you tell the process how to add new columns dynamically? when we refresh the data the new column should add exiting unpivot column. 

 

here i found one link about this for me it is not worked is there any options??  

please click the link for more details.

 

 

Thanks 

sandeep kumar 

11 Replies

    • avulasandeep's avatar
      avulasandeep
      Icon for Helper III rankHelper III

      hi LivioLanzo,

      can you please explain this showing with an example where to keep this code at starting to ending.

       

       

      Thanks

      sandeep 

      • LivioLanzo's avatar
        LivioLanzo
        Icon for Solution Sage rankSolution Sage

        avulasandeep

         

        actually this is easier than what I described above. Did you try using the 'Unpivot Other Columns' feature instead of 'Pivot Columns' ?

         

         

  • v-jiascu-msft's avatar
    v-jiascu-msft
    Icon for Microsoft Employee rankMicrosoft Employee

    Hi Sandeep,

     

    Did you mean the unpivot table function in the Query Editor? Maybe you can try the type "Unpivot other columns" though there could be some errors like “Type isn't the same". You can solve it by changing the type. Please refer to the snapshot below.

    is-there-any-option-for-columns-adding-dynamically-to-pivot-Table

     

    Best Regards,
    Dale

    • avulasandeep's avatar
      avulasandeep
      Icon for Helper III rankHelper III

      Hi Dale, 

       

      what I am asking exactly is

       

      "How to add the columns automatically to the Pivot Column when we add new columns in the database or excel ". 

      as shown in below 

      Hope you understood.

       

      Thanks

      Sandeep 

      • LivioLanzo's avatar
        LivioLanzo
        Icon for Solution Sage rankSolution Sage

        If you use the 'Unpivot Other Columns' feature then you just need to select the columns you do NOT wish to unpivot and all the rest will be dynamically unpivoted avulasandeep