Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
vireshkolagimat
Creator III
Creator III

Exclude the data if sales is zero

Hi All,

I've the below scenario where Qlikview adding the both the rows to get the sum and giving the result by adding both the rows.

       

PRODUCTCODEINVOICENOINVOICEDATESALESCOSTSALESLISTVALUESALESQTYSALESVALUE
123800718511100019007-JAN-18937.2520.55020.5
123800718511100019007-JAN-18187.450100

In the above case net sales = SALESQTY * SALESVALUE= 1025

But i am getting 1230. SO it is taking the salesqty from next row, adding it to the first row and then giving the net sales.

While calculating the net sales i tried to use the set analysis like sum({<salesvalue-={0}>}salesvalue*salesqty)

But no change in the results.

7 Replies
petter
Partner - Champion III
Partner - Champion III

I can't seem to be able to reproduce anything other that the correct value which is 1025:

2018-01-14 16_24_19-QlikView x64 - [C__Users_Petter_Downloads_# QC 2018-01-14 Sales sums.qvw_].png

Where did you calculate this? In what type of QlikView Sheet Object? In a chart?

pradosh_thakur
Master II
Master II

try

sum({<PRODUCTCODE={"=(salesvalue>0)"}>}salesvalue*salesqty)

Learning never stops.
vireshkolagimat
Creator III
Creator III
Author

I am trying to show in pivot table.

petter
Partner - Champion III
Partner - Champion III

It works in a Pivot Table too for me.

2018-01-14 16_31_24-QlikView x64 - [C__Users_Petter_Downloads_# QC 2018-01-14 Sales sums.qvw_].png

Which dimensions are you using?

vireshkolagimat
Creator III
Creator III
Author

I am using that in a self service report. The data set is big and also the application. When i test it independently even i got the result. But  when i run in my application, not getting the expected result.

thanks for the help.

petter
Partner - Champion III
Partner - Champion III

Are you using the Aggr()-function?

What are the dimensions you are using?

vireshkolagimat
Creator III
Creator III
Author

Hi I am not using the aggr() function . I've created a self service report where the user can select multiple dimensions like division, region, product code etc and measures such as net sales, gross sales, sales cost etc as per their requirements.