Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Note: You may notice some temporary visual or styling issues in the Community. Our vendor is actively investigating.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

NODISTINCT

Hello,

I'm trying to get a nodistinct results but I get the wrong results when I use the following formulas:

=Count(if([Date de début]<=Date_max and [Date de début]>=Date_min,[Date de début])) => I get the distinct count



=Count(nodistinct if([Date de début]<=Date_max and [Date de début]>=Date_min,[Date de début])) => I get an empty column (no values)

Thanks for your help!

mel





4 Replies
Miguel_Angel_Baeyens

Hello Mel,

As far as I know, NODISTINCT clause is only allowed in the aggr() function, as Count() without modifiers returns the number of records where the field specified is in.

You may try with a different field that [Date de début] just to check that your conditional is returning more than one possible values for each comparison.

Hope that helps

Or
MVP
MVP

Try:

sum(if([Date de début]<=Date_max and [Date de début]>=Date_min,1))

Summing 1 for each relevant value is the same as counting non-distinct values, though I'll admit it doesn't read as cleanly.

Not applicable
Author

Hello and thank you for your answers.

I tried doing the count by another field but without success. The results are always distinct. I'm fearing that it might have to do something related to my schema/modelisation...

Not applicable
Author

Thanks for your answer.

I tried your suggested formula but the results are the same ...