Forum Discussion
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
- LivioLanzo
Solution Sage
It is possible, you can get a dynamic list of column names by using Table.ColumnNames function and remove the column name you do not want to unpivot by using List.RemoveMatchingItems
- avulasandeep
Helper III
hi LivioLanzo,
can you please explain this showing with an example where to keep this code at starting to ending.Thanks
sandeep
- LivioLanzo
Solution Sage
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
Microsoft Employee
- avulasandeep
Helper 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
Solution 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