# New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Partner

## Pivot Table Dimensionality()2 Total Used As Denominator for Dimensionality ()3 Expression

Hello,

I'm trying to create a "precent of total" expression (see attached screen shot).  The issue is that I need to have the denominator of the expression below be the subtotal amount of the previous dimension for all of the rows in the next dimension level.  Using the Aggr function in the current expression below, I was able to show the previous dimensions subtotal but, it is only showing the subtotal on the last row of the section.

I think I'm close.  Can anyone push me over the line....?    Thank you!!

=Sum(quantity) / Aggr( Count(orderid),Store#,item_type)

1 Solution

Accepted Solutions
MVP

## Re: Pivot Table Dimensionality()2 Total Used As Denominator for Dimensionality ()3 Expression

Can you try one of these:

=Sum(quantity)/Count(TOTAL <Store#, item_type> orderid)

or

=Sum(quantity)/Aggr(NODISTINCT Count(orderid),Store#,item_type)

4 Replies
MVP

## Re: Pivot Table Dimensionality()2 Total Used As Denominator for Dimensionality ()3 Expression

Can you try one of these:

=Sum(quantity)/Count(TOTAL <Store#, item_type> orderid)

or

=Sum(quantity)/Aggr(NODISTINCT Count(orderid),Store#,item_type)

Partner

## Re: Pivot Table Dimensionality()2 Total Used As Denominator for Dimensionality ()3 Expression

You did it again Sunny!

Thank you!!

MVP

## Re: Pivot Table Dimensionality()2 Total Used As Denominator for Dimensionality ()3 Expression

Which one of the two worked? If both did, then I suggest using the 1st one since it is Aggr() free

Highlighted
Partner

## Re: Pivot Table Dimensionality()2 Total Used As Denominator for Dimensionality ()3 Expression

I used the first one as we all know Aggr is resource heavy.