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

Issue with counting true / false values

Hi All,

I'm trying to do a basic count but am having some issues which I cant seem to resolve.

As part of my data load I read in a number of fields inc identifier and also addrarchive.

identifer is a varchar in sql server and addrarchive is a bit (hence stored as true or false).

I'm using the following expression

count(if(addrarchive='false', identifier))

but this give me no results (doing an sql query I know that it should give me178!!!

I've tried various different things for addrarchive i..e. -1 etc but no joys.

If anybody can help out with this simple thing it would be greatly appreciated!

4 Replies
Not applicable
Author

add a list box for the addrarchive copy the values out of their, (Their should be only 2 values (True and false or 1 and -1 etc.))

paste the values in your expression as Qlikview is case sensitive. Hopes this sorts out your problem

also ty set analysis

Count({<addrarchive={"False"}> identifier})

Not applicable
Author

hi,

would be easier to understand and help you if you could attach a sample QV file with your query

Not applicable
Author

Sorry for the late reply. Been dragged on to something else. I'll see what I can do early part of next week re this. Appreciate responses to date 🙂

Not applicable
Author

FYI managed to get this to work by using ={1} and this appears to retrieve correct results when compared to a sql query.

Initailly thought you had to surround numerics via quotes for the search but this didnt work i.e. {'1'}