Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Problem in straight table with “expression total” and “sum of rows” options

Hi everyone,

I have a problem with the straight table options “expression total” and “sum of rows”. I have the straight table below:

Sans titre.png

In the properties, I select “expression total” but I don’t know what this result means because it is really different from the real total.

Sans titre.png

When I select the option “sum of rows”, I get the correct result.

Sans titre.png

Sans titre.png

So I’d like to know what is the “expression total” trying to calculate? How do I interpret the result it gives me? Normally it should total my column (so the sum of the column) but it doesn’t.

Then if I want to get the sum of rows in a text object, when I use my expression I get the “expression total” instead of the "sum of rows"

Sans titre.png

and I want to get the "sum of rows"  97188 in my text object. How do I fix this?

I would really appreciate it if someone could explain to me why there is a difference?

Many thanks,

Jorge

2 Replies
swuehl
MVP
MVP

Hi Jorge,

Henric wrote a nice blog post that explains the difference between the two total modes:

http://community.qlik.com/blogs/qlikviewdesignblog/2014/06/23/subtotals

semperaugustus
Partner - Contributor II
Partner - Contributor II

Expression Total doesn't consider the dimensions of the table. It applies the formula to all the data, like if you insert the formula in a text object.

You can use in the text object the Aggr() function, in this case the formula is replicated one time for every value of dimension:  SUM(Aggr("Your expression", Date_calendrier))

DC