Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Aggr Function - wrong output

HI,

I have created the following expressions which are displayed in a Stacked Bar.

1)  Inventory <= 10 Days

Sum(if(Aggr((Sum ([CLosing_STK Value]) + Sum ([Intran_STK Value])) / (Sum ([Avg Value])/30),[Territory Name]) <= 10,1,0))

2)  Inventory Between 10 to 30 Days

sum(if((Aggr((Sum ([CLosing_STK Value]) + Sum ([Intran_STK Value])) / (Sum ([Avg Value])/30),[Territory Name]) > 10) and

(Aggr((Sum ([CLosing_STK Value]) + Sum ([Intran_STK Value])) / (Sum ([Avg Value])/30),[Territory Name]) <= 30),1,0))

3)  Inventory > 30 Days

sum(if(Aggr((Sum ([CLosing_STK Value]) + Sum ([Intran_STK Value])) / (Sum ([Avg Value])/30),[Territory Name]) > 30,1,0))

Expression No.2 and 3 are displaying correct value whereas Expression 1 does not.  It shows a higher value.'

Am i doing something wrong ?  Is there any other way to display the output.

Thanks in advance.

2 Replies
Not applicable
Author

Hi

I'm not sure that understand what you mean completely but I test it on some sample data and it works correctly

but maybe my attachment helps you

1.JPG.jpg

Not applicable
Author

HI Behnaz,

Thanks for you reply.  

The issue was - it was counting Null value also, which is in 'Inventory <= 10 Days'.   I need to count the values which are Zero.  But not  which are NULL.