# QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

New Contributor III

## Total Sum

Hi,

I got an expression that looks like this:

SUM

([\$(='COST Part Cost Appproved '&vInflatedString&\$(vCurrency))]) /
aggr(NODISTINCT
count({AS_Contract<
\$(vAS_ContractFilter)>}[CONTRACT_YEAR Contract ID])
,
[CONTRACT_YEAR Contract Year],[VEHICLE Vehicle Type])

This works fine and gives me a result like:

1

3

6

5

total:15

The total I got is from the total mode option "sum of rows"

Now I need to calculate this total in an expression but I can't figure it out.

Does anybody have an idea?

Thx

1 Solution

Accepted Solutions
MVP

## Re: Total Sum

That's not easy to answer without knowing your setting (used with which chart dimensions? data model?) and without knowing how these dollar sign expansions work in detail.

But you can look into the HELP, search for 'sum-of-rows in a pivot table using advanced aggregation' (even if you are not using a pivot table). It explains how you can emulate the sum of rows feature.

Looks like

sum( aggr(

SUM

([\$(='COST Part Cost Appproved '&vInflatedString&\$(vCurrency))]) /
aggr(NODISTINCT
count({AS_Contract<
\$(vAS_ContractFilter)>}[CONTRACT_YEAR Contract ID])
,
[CONTRACT_YEAR Contract Year],[VEHICLE Vehicle Type])

CHARTDIM1, CHARTDIM2))

MVP

## Re: Total Sum

That's not easy to answer without knowing your setting (used with which chart dimensions? data model?) and without knowing how these dollar sign expansions work in detail.

But you can look into the HELP, search for 'sum-of-rows in a pivot table using advanced aggregation' (even if you are not using a pivot table). It explains how you can emulate the sum of rows feature.

Looks like

sum( aggr(

SUM

([\$(='COST Part Cost Appproved '&vInflatedString&\$(vCurrency))]) /
aggr(NODISTINCT
count({AS_Contract<
\$(vAS_ContractFilter)>}[CONTRACT_YEAR Contract ID])
,
[CONTRACT_YEAR Contract Year],[VEHICLE Vehicle Type])

CHARTDIM1, CHARTDIM2))