Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

The where clause

Hi Everyone,

Yet another problem..

I can't upload demo models for some reason so please bare with me.

I am trying to bring back sales for a store excluding a value only for that store in a where clause:

eg. something like this:

select *

from demo.qvd (qvd)

where storename1's sales is not equal to -538726.98

and storename1's sales is not equal to -32487263.98 - Can you see what i'm trying to do??

I know how to say where sales <> value but don't know how to aggregate it per another field.

Another thing - when i try to upload a qlikview model i get this error:

error loading image

Any suggestions?

Thanks guys

1 Solution

Accepted Solutions
blaise
Partner - Specialist
Partner - Specialist

where not (StoreName='Store1' and Sales=876566.34);

View solution in original post

4 Replies
Miguel_Angel_Baeyens

Hello Richard,

Do you mean adding different fields to the WHERE clause? Or different values for different fields?

Not applicable
Author

Ok, i have Sales as a field and StoreName as a field. I want to filter out specific sales from a certain store in the script. For argument sake where the store is 'Store1' and that store has an instance of wrong values (where the Sales for that store is -876566.34) - I do not want that value.

Something like this:

Select *

From demo.qvd

where StoreName('Store1')Sales<>'-876566.34'

so i want all the other stores to remain the same, just filtering out Store1's Sales where they are wrong.

Hope i'm explaining it alright.

blaise
Partner - Specialist
Partner - Specialist

where not (StoreName='Store1' and Sales=876566.34);

Not applicable
Author

Thanks blaise,

If you have 2 values that you want to exclude do you say:

where not (StoreName='Store1' and Sales='876566.34')

and not (StoreName='Store1' and Sales='25894.24')

or:

where not (StoreName='Store1' and Sales='876566.34' and Sales='25894.24') ??