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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
martinpohl
Partner - Master
Partner - Master

Sum in table chart only for shown values

Hello,

maybe someone can help me.

In a table chart it is possible to show the sum, of course. And it is possible to delimit the numbers of records be shown.

But the sum is build over all records, shown records and out faded.

Is there a possibility to calculate the sum only for shown records?

Thanks

Regards

Martin

Example

Verkäufer Summe Umsatz
159000 €
Name 361000 €
Name 253000 €
Name 423000 €
Name 122000 €


If I delimit the numbers of shown records to 3 I only expected to see the sum of the first 3 records

Verkäufer Summe Umsatz
159000 €
Name 361000 €
Name 253000 €
Name 423000 €


in this case 137000€

7 Replies
john_duffy
Partner - Creator III
Partner - Creator III

Hi Martin.

The sum should adjust to the value of the first three records. Can you post a sample application, using inline load, to demonstrate the issue you are having.

John.

martinpohl
Partner - Master
Partner - Master
Author

here is the file

john_duffy
Partner - Creator III
Partner - Creator III

Hi Martin.

You are using Expression Total as your total mode. Therefore, your column totals are calculated based on the expression value for each dimension, not simply a sum of the values in each row.

For example, in your application if you select Type A and C the avg(Value) for A is 15 and C is 27. The avg(Value) column total is 19.8 (ie. the average of all A values 10, 15, 20 and C values 4, 50).

If you want your total columns to simply sum up the values in each row, change the total mode to Sum of Rows.

Let me know if this answers your question.

martinpohl
Partner - Master
Partner - Master
Author

Hello John,

no, sum of rows generates the same result.

Regards

john_duffy
Partner - Creator III
Partner - Creator III

I get a different result when changing the total mode to Sum of Rows. See the attached application. You have to set the mode for each expression.

martinpohl
Partner - Master
Partner - Master
Author

see my example.

john_duffy
Partner - Creator III
Partner - Creator III

The total modes can work the same is some cases, depending on the aggregation funcition used. The sum function will sum all values for the selected dimension which works the same as summing the results in each row. As shown in my example, functions such as avg and max will return different results based on the total mode.