Hello everybody. I need some help in the following. I am creating a dimesion using a macro but I do not know how to "up" the dimension. I solve this by removing some dimensions and then creating the new one and then re-creating the ones that I have deleted, but this take too much time.
The example is as the following
at the beginning I have the following dimensions:
And when the user need some specific data I have to show the following dimensions:
As I explained before I create new dimension but this command create the new one at the final position.
IMPORTANT: I use Qlikview 9 and it is a PIVOTTABLE so the MOVEDIMENSION function is not working
Thank you for this example. I was doing a similar exercise and wanted to have a button to add/remove a dimension dynamically. It seems that to identify a dimension by a name (and not an index number) you will need to have the Lable attribute populated. Once that is populated you can access the Dimension label name by using the "Title" property of the Item.
The code i used is below if anyone's interested:
set prop = chart.GetProperties
set dims = prop.Dimensions
for i = 0 to dims.Count-1
if dims.Item(i).Title.v = "ABC" Then
exists = 1
existsIndex = i
if exists = 1 then
set updProp = chart.GetProperties
set updDims = updProp.Dimensions
updDims.Item(updDims.Count-1).Title.v = "ABC"