2 Replies Latest reply: Nov 18, 2014 9:18 AM by DIEGO CARRARA

# 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:

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.

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

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"

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

• ###### Re: Problem in straight table with “expression total” and “sum of rows” options

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

• ###### Re: Problem in straight table with “expression total” and “sum of rows” options

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