From the QV Manual: "dimensionality ( ) returns the number of dimension columns that have non-aggregation content, i.e. do not contain partial sums or collapsed aggregates." So, you I don't think you need the avg() statement as it is reporting the number of dimensions, which would always be the same for all rows. You can use 'if' statements to derive data based on the value returned. The manual said it is typically used for conditional formatting. What are you trying to achieve?
Not exactly Ideally i want to show the expanded number of dimensions. If i expand manually the two dimension it dimensionality will show 2 for the row with dimension expanded and others for 1 where dimension is not expanded. I want to add the additonal column with all rows having the same value as the max(Dimensionality) or it can be like i need to store the max (dimensionality()) in a variable.