# New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
New Contributor III

## Need Assistance in Count Function

Hi Experts,

I do have table as below and need to count the customers who has returned the product from total sales.

 Product Year Month Value Item 1 2015 JAN -1 Item 2 2015 JAN 10 Item 3 2015 JAN 20 Item 4 2015 JAN 30 Item 5 2015 JAN -40 Item 6 2015 JAN 50 Item 7 2015 JAN 60 Item 1 2015 JAN 70 Item 2 2015 JAN -80 Item 3 2015 JAN 90 Item 4 2015 JAN -100 Item 5 2015 JAN 110 Item 6 2015 JAN 120 Item 7 2015 JAN 130 Item 1 2015 JAN 140 Item 2 2015 JAN 150 Item 3 2015 JAN -160 Item 4 2015 JAN 170 Item 5 2015 JAN 180 Item 6 2015 JAN -190 Item 7 2015 JAN 200

The out put which i would like to get as below :

In Label:

No Returned Products: 2

 Month Total Value Total Item 1 209 Item 2 80 Item 3 -50 Item 4 100 Item 5 250 Item 6 -20 Item 7 390 JAN Total 95

Thanks

Raju .K

Tags (2)
1 Solution

Accepted Solutions
MVP

## Re: Need Assistance in Count Function

Looking for this?

Expression: =Sum(If(Aggr(Sum(Value), Product) < 0, 1, 0))

7 Replies
MVP

## Re: Need Assistance in Count Function

Looking for this?

Expression: =Sum(If(Aggr(Sum(Value), Product) < 0, 1, 0))

Partner

## Re: Need Assistance in Count Function

you would the Basic table with

SalesPerMonth:

Month,

Product,

sum(Value)

resident Yourtable

Group by Month, Product

drop table yourtable

But how do you recognize returned products? by negative sum per month?

then in a textbox

if (sum(Value)<0, Count(Product))

Honored Contributor II

## Re: Need Assistance in Count Function

Hi Raju,

Try like this in Pivot Table.

New Contributor III

## Re: Need Assistance in Count Function

Excellent Sunny Thanks a lot

New Contributor III

## Re: Need Assistance in Count Function

Thanks Rudolf

New Contributor III

Thanks Mate

MVP

No problem