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

Count Distinct

Hi everyone,

Need some help to resolve this issue (i think is an issue):

I'm using this query: "Count( {<IdRequa={'0'}, IdRes={'Qual'}>} Distinct IdSub)".

The Qlikview solve was 1.

My question or issue is I need result "count=0". When i'm using the expr {<[IdRequa]={'0'}, [IdRes]={'Qual'}>} i'm using this like a "filter" and Qlik are making this like a Distinct

The table source is below (in this exemple the column IdRes is always equal not always is, this is just a sort of total table):

IdMapIdCandidaturaIdSubIdRequaIdRes
2992228311-1Qual
29882282110Qual
2990228322-1Qual
29892282220Qual
298622821250Qual

Could anyone help with this?

Many thanks

4 Replies
sunny_talwar

QlikView is giving you 1? I would think it would give you 3... and why do you want 0?

Not applicable
Author

Qlikview is giving me 1 and the line is IdMap "2988".

I need to do this with the result 0.

sunny_talwar

What is your logic for seeing 0? Can you elaborate?

shivkumar300
Contributor III
Contributor III

As per your requirement I have used below exp and result showing here is 0 & 1 according to the selection.

=if(IdRequa='0'and IdRes='Qual',0,Count( Distinct IdSub))

Capture1.JPG