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

Percentage of dimension in a table

Hello everyone,

Im trying to compute in qlikview the % of dimension 1 as i show in the last column below.

In my data i have lots of fields in dimension 1, in this example i only use numbers 1 and 2.

Can anyone help me finding a formula that calculates how many cases exists from dimension 2 in the total of dimension 1.

Ex: Dimension 1 = 1

Dimension 2 = A, B, C, D

I want to compute the percentage of A in the total dimension 1 =1 , the percentage of B in the total of dimension 1=1.

                    

Dimension1Dimension 2Count values%% of Dimension 1
1A107%14%
1B2014%29%
1C3021%43%
1D107%14%
2A107%14%
2B2014%29%
2C3021%43%
2D107%14%

Best regards,

Eliano Marques

1 Reply
Not applicable
Author

Hi, try this:

count(distinct Value)/ count(total <Dimension1> distinct Value)

Regards