Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

multiple distinct expressions in 1 chart issue

Hi all,

Attached is a qvw with a sample data set.

I'm trying to do 2 distinct counts on  the field and for some reason I get 0 on one of them when actually it should have a number.

why is that?

the selection I'm making is: Date = January

you can see that the exposures unique is correct but the responders unique is not.

why is that?

Thanks,

Boris

1 Solution

Accepted Solutions
Not applicable
Author

You can't use the Aggregation function inside of IF. Please find the attached qvw. I wrote both IF & set Analysis expressions.

IF Cond:

Inventor  : =Count(DISTINCT if(invited=1,subkey))

Responder : =Count(DISTINCT if(responder=1,subkey))

Set Analysis:

Inventor : =Count({<invited={1}>}DISTINCT subkey)

Responder : =Count({<responder={1}>}DISTINCT subkey)

View solution in original post

5 Replies
chaper
Creator III
Creator III

Did you tried Set analysis??

chaper
Creator III
Creator III

Check the attached app.Let me know whether it works or not?

Not applicable
Author

Thanks, works.

but shouldn't the if clause handle it?

Not applicable
Author

You can't use the Aggregation function inside of IF. Please find the attached qvw. I wrote both IF & set Analysis expressions.

IF Cond:

Inventor  : =Count(DISTINCT if(invited=1,subkey))

Responder : =Count(DISTINCT if(responder=1,subkey))

Set Analysis:

Inventor : =Count({<invited={1}>}DISTINCT subkey)

Responder : =Count({<responder={1}>}DISTINCT subkey)

chaper
Creator III
Creator III