Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Count If

Hi,

i need to count the variable NAME when the AGE is 18 or 19 and GENDER is M.

If there is only one condition ( for exemple AGE) i use: count({<AGE={'18','19'}>} NAME) and it works.

How can I introduce also the second condition (GENDER=M)?

Thank you

25 Replies
Not applicable
Author

try this

count({<AGE={"<=$(VARIABLE)"},GENDER={'M'}>} NAME).

Not applicable
Author

I try

count({<AGE={"<=$(VARIABLE)"},GENDER={'M'}>} NAME) but there is not difference between the count with or without AGE={"<=$(VARIABLE)"}.

Not applicable
Author

I try

count({<AGE={"<=$(VARIABLE)"},GENDER={'M'}>} NAME) but there is not difference between the count with or without AGE={"<=$(VARIABLE)"}.

Not applicable
Author

Macro,

As suggested by Vladimir, the expression should work.

Look at the attched application.

Hope this helps you.

- Sridhar

Not applicable
Author

Thank you!! You and Vladimir understand my problem and with this application now i'm understand where i've made mistakes.

All it's clear! Thank you again for the great application!

Ciao

Marco

Not applicable
Author

Thank you!! You and Vladimir understand my problem and with this application now i'm understand where i've made mistakes.

All it's clear! Thank you again for the great application!

Ciao

Marco

Not applicable
Author

Hi All, how do I say not equal to? 

The example is here

count({<AGE={'18','19'},GENDER={'M'}>} NAME)

I want to say. count if Age is not equal to 18 or 19 ?

Thanks

Not applicable
Author

Hi All, how do I say not equal to? 

The example is here

count({<AGE={'18','19'},GENDER={'M'}>} NAME)

I want to say. count if Age is not equal to 18 or 19 ?

Thanks

Miguel_Angel_Baeyens

Hi,

In that case exclude those values from the set:

Count({< AGE -= {18, 19}, GENDER = {'M'} >} NAME)

When values are numeric, there is no need for quoting, actually that slows down the calculation, since QlikView has to deal numeric values as literals (strings)

Hope that helps.

Miguel

Not applicable
Author

Hi all,

i'm really new but well i found many things here in the community but now i really need a little help...

it schould be easy but for me it doesen't work...

i nearly need the same like this count({<AGE={"<=18"},GENDER={'M'}>} NAME)

but i will need addtional a 'distinct' for the name...

can somebody let me know how to enter that???