My requirement is I am trying to sort the last expression in pivot chat irrespective of selected 11 dimensions.
For that I am creating a additional first column with the last expression and using it in sort tab using expression
Can I write use this macro to hide the first column in every pivot chart in dashboard??
It will be great if you can explain how this macro work as I am new to macros...
call HideColumn("CH01", 2)
private sub HideColumn(ch, n)
set ch = ActiveDocument.GetSheetObject(ch)
ch.SetPixWidth (n-1), 0
I don't see the need for this additional column (is it a calculated dimension) to do the sorting. If you want to sort pivot table by an expression, simply go to the Sort tab, select first dimension, check "sort by expression", and copy your expression here.
If I didn't understand what you want - please upload your application.