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

Something Wrong with Sum

Hello Guys,

I have a problem with the sum of field. I have this table filtred:

Cattura.JPG

If I do with a graphic SUM(finanziato) I expect that the result is the Sum of the 7 field present in ''finanziato''. But the result is this:

Cattura1.JPG

The field '400000' is taken 5 times instead 2 times. If I used the function Count indeed the result is this:

Cattura2.JPG

The field '40000' is taken 5 times. How can I do the sum correctly?

Thanks for the help.

7 Replies
Peter_Cammaert
Partner - Champion III
Partner - Champion III

By eliminating all superfluous (possibly identical) rows from your internal table.

The object in your first screenshot is a Table Box. A Table Box is actually a set of listboxes with the same main characteristic: every unique combination of values in all columns is only shown once. While there may be 5 identical copies present in your internal table (as correctly reported by count(...) = 5), only one will be shown.

Your extensive illustration material leads me to conclude that the bottom two tables are actually the correct ones.

yoganantha321
Creator II
Creator II

Hi Lorenzo,

Better you try with straight table , I have used in straight table and got the output i think this is your expectationCapture.PNG

Not applicable
Author

Thanks. I have solved with a DISTINCT in the LOAD. But now I have another problem:

If I have something like this:

Cattura.JPG

I have a practice that repeats 2 times because it have 2 different states. If I am in this type of situations, I want that practice not being counted in NumericCount(pratica). For Example:

Cattura.JPG

Now I have 591 practice, but the 10495 because appears 2 times, I don'wanna count it (the practices must be 591)

I'm using a Straight Table.

yoganantha321
Creator II
Creator II

Hi lorenzo,

Better you try with same distinct in practice also...

Not applicable
Author

If I do a DISTINCT in practice I don't delete the pratice 10495, but I delete the duplicate (one practice remain, and I don't wanna this, I want delete the practice totally)

Not applicable
Author

Hello,

I propose again the question.

I have created with a Straight Table a field NumericCount(practice) to count the number of practice present in the table (I see also the same practice that have different state, and the count will be 2 or more). Can I put a condition in the field NumericCount(practice) to not want to see the practice that have Count>1?

vishsaggi
Champion III
Champion III

Can you share that sample file you are working on? Would be easy to try on.