Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

dimensionality()=0

hello guys,i am naveen i am new to qlikview ,in a interview i was asked a scenario

i have three countries sales ,by using pivot chart we should display only two countries  names but the total has to be sum of all the three countries sales,

so how could i can achieve these ,do we need to use dimensionality ()=0 kind of function to get total sales ,

actually what does dimensionality()=0 means

thanks in advance

2 Replies
Chanty4u
MVP
MVP

hi,

go through this thread u will find the solution and clarity of it.

dimensionality Vs secondarydimensionality

hope this helps you

suresh chanty

Digvijay_Singh

I think showing two countries and total for all three can be done without using dimensionality as below -

Used the simple script -

Load * inline [

Country,Prod,Sale

India, A,2000

US, B,4000

UK, C,3000 ];

pivot1.PNG

Dimensionality shows the no of expanded dimensions, QV sums the expression values keeping in view the expanded dimensions in pivot table, if you see below -

Pivot2.PNG

As you see total row doesn't show any dimension so its value is zero. rest of the rows have 1 dimension(Country) expanded so its value is 1. When I click on '+' and expand one more dimension, see how value of Dimensionality is changes as below -

Pivot3.PNG

You can see in above image, first row has Dimensionality() value as 2 as two dimensions are expanded. Total is Dimensionless row so it is showing 0. Using condition Dimensionality()=0 we can format/color the total row differently.

There are many good posts available in Community, please check below for more detailed explanations -

How to use - Dimensionality()

Chart Dimensionality

Thanks,

Digvijay