# QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Announcements
QlikWorld, June 24-25, 2020. Free virtual event for DI and DA gurus. Register Today
cancel
Showing results for
Did you mean:
Highlighted
Specialist

## Dimensionality for custom subtotal in pivot table

Hi All,

I am trying to modify a subtotal using Dimensioanlity:

In case a dimension has the value 3, to sum items from dimension 2 and 3, which are flagged in the script.

=if(Dimensionality() =2 and Balance_TotalCode =3, sum({<Balance_Flag_TOTALCOMMANDEQU={'1'}>}Balance_Amount),sum(Balance_Amount))

In the data:It should sum the items in orange (Balance_TotalCode =2) and green (Balance_TotalCode =3)

But It only sums the items in green.

The row in yellow represents the desired location with the wrong result.

Will appreciate assistance!

Thanks!

Tags (2)
1 Solution

Accepted Solutions
Highlighted
MVP

## Re: Dimensionality for custom subtotal in pivot table

Try with Total qualifier

=If(Dimensionality() =2 and Balance_TotalCode =3, Sum(TOTAL {<Balance_Flag_TOTALCOMMANDEQU = {'1'}>} Balance_Amount), Sum(Balance_Amount))

3 Replies
Highlighted
MVP

## Re: Dimensionality for custom subtotal in pivot table

Try with Total qualifier

=If(Dimensionality() =2 and Balance_TotalCode =3, Sum(TOTAL {<Balance_Flag_TOTALCOMMANDEQU = {'1'}>} Balance_Amount), Sum(Balance_Amount))

Highlighted
Specialist

## Re: Dimensionality for custom subtotal in pivot table

Kudos Sunny!

As usual, your help is tremendous!

Highlighted
Creator II

## Re: Dimensionality for custom subtotal in pivot table

Hi Experts,

I am new to learn this topic,

can you please share the sample QVW file.