Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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
swuehl
MVP
MVP

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))

View solution in original post

1 Reply
swuehl
MVP
MVP

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))