Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

count if issue

Hi everyone,

     i will be pleased if someone can help me with this:

table 1:

city
mail
1m@m.com
2m@m.com
2n@n.com
3m@m.com
4o@o.com
1o@o.com
1y@y.com

Straight Table i need:

city
quantity
12
21
31
41

the procedure is this:

city = 1 has m@m.com mail and this mail olso is in city = 2 and 3, so 1

and city = 1 has o@o.com mail and this mail olso is in city = 4, so 1

but city = 1 has y@y.com mail and this mail only is in city = 1, so 0

then quantity => 1 + 1 + 0 = 2

thanks

gerardo

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Is this just a flag field? How is it connected to your table?

It's probably something like

=count({<subscribed={1}, mail={"=count(distinct city)>1"}>} mail)

or

=count({<subscribed={1}, mail={"=count({<subscribed={1}>} distinct city)>1"}>} mail)

View solution in original post

4 Replies
swuehl
MVP
MVP

So you want to consider only mail values that appear in more than one city?

Create a straight table chart with dimension city and as expression

=count({<mail={"=count(distinct city)>1"}>} mail)

Hope this helps,

Stefan

Not applicable
Author

Thank you very much swuehl!

I only need to add the condition “subscribed = 1”, could you give me a hand?

Thanks again

gerardo

De: swuehl

Enviado el: miércoles, 23 de mayo de 2012 02:38 p.m.

Para: Pauza, Gerardo

Asunto: - Re: count if issue

QlikCommunity <http://community.qlik.com/index.jspa>

Re: count if issue

created by swuehl <http://community.qlik.com/people/swuehl> in New to QlikView - View the full discussion <http://community.qlik.com/message/222225#222225

swuehl
MVP
MVP

Is this just a flag field? How is it connected to your table?

It's probably something like

=count({<subscribed={1}, mail={"=count(distinct city)>1"}>} mail)

or

=count({<subscribed={1}, mail={"=count({<subscribed={1}>} distinct city)>1"}>} mail)

Not applicable
Author

Thanks swuehl!

De: swuehl

Enviado el: miércoles, 23 de mayo de 2012 03:34 p.m.

Para: Pauza, Gerardo

Asunto: - Re: count if issue

QlikCommunity <http://community.qlik.com/index.jspa>

Re: count if issue

created by swuehl <http://community.qlik.com/people/swuehl> in New to QlikView - View the full discussion <http://community.qlik.com/message/222234#222234