Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

remove line with '0' in expression

hello all,

i need your help in removing the lines where the expression quantity is zero (0).

I have a table as shown below where i have ranked the codes by their volume.

However i do not wish to have the lines where the Volume is 0. For me the table should only display those whose values are greater than 0 and be displayed as such

I have attached the qvw for your convenience.

Thanks in advance for your help and advices.

Regards,

Rajiv

1 Solution

Accepted Solutions
swuehl
MVP
MVP

My expression is equivalent to

=aggr(if(sum(volume)<>0,symptoms_code),symptoms_code)

so you could read it like this:

Group your records by symptoms_code, calculate the sum(volume) per symptoms_code. Return symptoms_code where the sum is not zero.

So you get a list of your symptoms_code values, but limited to your condition.

View solution in original post

6 Replies
swuehl
MVP
MVP

Try this as calculated dimension instead your current dimension:

=aggr(if(sum(volume),symptoms_code),symptoms_code)

Hope this helps,

Stefan

Anonymous
Not applicable
Author

Or just dont load the information

You can do this by adding the following to your load script:

Where volume <> 0 ;

like:

LOAD symptoms_code,

     information,

     volume

FROM

E:\HCSC2516\Data\test1.xls

(biff, embedded labels, table is Sheet1$)

Where volume <> 0 ;


Not applicable
Author

it suits me, thanks swuehl..

can you please briefly describe me the calculated expression you suggested, i cannot realy understand its definition in help menu in QV.

swuehl
MVP
MVP

My expression is equivalent to

=aggr(if(sum(volume)<>0,symptoms_code),symptoms_code)

so you could read it like this:

Group your records by symptoms_code, calculate the sum(volume) per symptoms_code. Return symptoms_code where the sum is not zero.

So you get a list of your symptoms_code values, but limited to your condition.

Not applicable
Author

thanks for the explanation.. got it

Not applicable
Author

good idea denis, however it can be applied for the example i gave, however in the app am working, the sum is calculated in the expression itself