Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

I have a "sum" problem.

Hello ,

I calculated masraf and kdv part but i have problem.If ı use just sum function (sum(Masraf) and sum(Kdv)),calculated all record and If use sum with distinct  (sum(distinct masraf) and sum(distinct kdv)),this not calculated same record.

How can i solve this problem?

Normally Masraf = 135 Kdv =198

10 Replies
petter
Partner - Champion III
Partner - Champion III

If you have a look at the data table you have in your QlikView document it consists of 154 rows and 22 fields.

They have been read from a QVD-file and I presume that they are correct - right?

There are multiple records for many of the companies. That is not necessarily something wrong. For instance for "Eco Market-Inh:Seyhmus Koluman" there is 6 rows. If you don't want to have multiple records for any company you will have to create some logic to reduce or calculate or select the row that will be the one for each company.

Most of the companies have multiple records - look here:

2016-02-27 #6.PNG

You refer to the table box you created with only three fields as something you could manually sum up. But the table box in QlikView shows only unique rows from the selection of fields that you have made. Since you selected only three fields there are many duplicates visually and they will be hidden. The numbers you get for each of the rows is the number that is common for the duplicates.

If your underlying data is correct - what comes from the QVD - then you should use table charts like STRAIGHT TABLE an PIVOT TABLE to do calculations. The TABLE BOX is not meant for any type of calculation. It is meant to just show rows and fields from the underlying table and it will eliminate VISUALLY all that are duplicate rows - that is VISUAL duplicates - which might not be duplicates in the underlying table.

The reason why for instance Ayyildiz comes up with three rows in your table box is that they have different numbers for KDV whereas Eco market has identical numbers for it's four rows.

This is all correct according to how QlikView is supposed to work. So it is important to learn how QlikView handles data and how it works in the different sheet objects. It is not necessarily intuitive if you come from a spreadsheet background.