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

Total formula not giving the result I want

I am having trouble with totals. I have managed to get the correct total in a stragit table by using the Sum of Rows. However I want to repeat this total in a text box but I can only get the total that the straight table displays when expression total is selected.

I guess the sum of rows is doing something that I am missing from my formula in my text box.

=if(sum([Local Line Total Amount]=0),sum([Local Budget Amount]),sum([Local Item Extended Price]))  this keeps giving me 6785530 but I know it should be 3210890

This is the table with totals at the top. Clearly the first column is totalled incorrectly and the second is correct but my formula gives me the first total.

67855303210890
101500015000
18210000210000
3220000002000000
51100000100000
52155100155100
654400044000
72200000200000
764171841718
782781227812
8625602560
894500045000
906100061000
918400028000
923000030000
944000020000
1066750067500
107208000100000
1081200012000
11823001200
1195000050000

Any ideas? Please.

Thanks in advance.

12 Replies
Anonymous
Not applicable
Author

Thanks, this works perfectly.

Anonymous
Not applicable
Author

Thanks for the reply - whilst you may well be correct about the data model the aggr function seems to have fixed my issue so I won't go looking for trouble by re-examing the data model.

Anonymous
Not applicable
Author

Thanks for the reply - whilst you may well be correct about the data model the aggr function seems to have fixed my issue so I won't go looking for trouble by re-examing the data model.