Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Help: My straight table sum is not accurate!!!

radioactive.PNG

               Here is where my definition is-------------------------> here is my count and the bolded number is the sum.... clearly, 2+3+2+3+1+1 =/= 8...

can someone please tell me where i made the mistake at please?

also, i am trying to do:

sum(count(distinct DeliveryPostalCode)) and i kept getting the wrong answer, does anybody have any insight on this??

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hi Jim,

If you have a straight table, you can just go to the chart properties > expression tab > set expression total to "Sum of rows" instead of expression default.

View solution in original post

6 Replies
Anonymous
Not applicable
Author

Hi Jim,

If you have a straight table, you can just go to the chart properties > expression tab > set expression total to "Sum of rows" instead of expression default.

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     If the solution given by Johannes doesnt work try this.

     Sum(Aggr(Count (Distinct DeliveryPostalCode),Dimension1,Diemsnsion2))

     Change the Dimension1 with tour dimensions of the chart. Include all the dimension seperated by comma.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
hic
Former Employee
Former Employee

Both Johannes' and Kaushik's solutions will change the number so you get 12 instead of 8.

But be careful here. I would first check my data: If QlikView says "8" on the total row, then there are only 8 distinct values in the data set. QlikView does not return the wrong answer. The reason that you have the numbers you have, is that your data model is made so that one and the same distinct value is found on several rows in the straight table. So if you sum it to 12, you will count the same value twice. If that is the way you want it, then you should use Johannes' or Kaushik's solution.

But if it isn't, you should think again.

HIC

Not applicable
Author

Mr. Johannes Sunden,

     thank you for your answer, that's exactly what i need.

Not applicable
Author

Mr Kaushik Solanki,

     thank you for your input, it's more than helpful!!!

Not applicable
Author

Mr Henric Cronstrom,

     thank you for your input, double counting the numbers is exactly what i need, thank you!