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

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
P_Kumar
Contributor III
Contributor III

Totals Function - Auto vs Sum

Hi,

While I am using Totals function as 'Auto' it's generating wrong totals (despite summing up the records in the expression) but another filed with same expression but when select Totals Function as 'Sum' giving the right results.  

I have a requirement to show the value as KPI where it's automatically considering Auto as Totals function and I don't see any option for that KPI's to change the Totals function from Auto to Sum.  Hence, can we use some expression and make the KPI's expression to automatically consider 'Sum' but not 'Auto'?

Attached the qvf, screenshot and source file.  Please help.  Thanks.

Labels (2)
1 Solution

Accepted Solutions
Lisa_P
Employee
Employee

Use this expression:
Sum(Aggr(Sum(Sales)*avg(Price),Country))

View solution in original post

1 Reply
Lisa_P
Employee
Employee

Use this expression:
Sum(Aggr(Sum(Sales)*avg(Price),Country))