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

Totals in Table is correct, but not in KPI

Hi,
I am having issue with total sale price for a KPI.

The table is showing the correct total if I set Totals Function to "Sum"

Totals Function.png

Table with Sum selected.png

When I set the Totals function to Auto I get the same results as the KPI calculation.

Table with Auto selected.png

KPI.png

I need to show the total sales in KPI.

Thanks for the help!

7 Replies
hacr
Creator
Creator

I found following in the forum, and as expected, the evaluation is different. It would be a help to see the data used for the example giving the "wrong" KPI

Auto means calculate the total by evaluating the expression over all data.  Sum means to sum up the rows in the chart. There can be differences depending on your data model and dimensions used.  For example, Auto will never double count. Sum can double count when for example the same fact is connected to more than one dimension in the chart.

Anil_Babu_Samineni

Can you please share application to test

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Anonymous
Not applicable
Author

I'm trying to have in KPI, so I don't know how to set the formula .

Anonymous
Not applicable
Author

Please find attached test qvf

Anonymous
Not applicable
Author

Do you guys have any solutions? Thanks.
timpoismans
Specialist
Specialist

Is this what you had in mind:

KPI total.PNGMeasure used is:

Sum(Aggr(Sum(Price)*Sum(Sales),[item #]))

Anonymous
Not applicable
Author

That's what I wanted. I'll test it and let you know. Thanks for the help.