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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

DISTINCT application_no

can someone give me the correct code to run this, i cannot get it to work

I'm trying to count the amount of apps where the new date and the settlement date the same is

count(DISTINCT application_no, If(new_dates=settled_dates,'Y'))

Labels (1)
4 Replies
simenkg
Specialist
Specialist

You create a flag in your script:

Load *,

           if(new_dates = settled_date,1,0) as ValidFlag

from table...;

then your expression becomes:

count({<ValidFlag={1}>} application_no)

Anonymous
Not applicable
Author

Hola,

Use this

count(distinct If(new_dates=settled_dates,application_no))


HTH

Not applicable
Author

Hi @Francois


Try this Expression


=Count(DISTINCT If(new_dates = settled_dates, application_no))

Not applicable
Author

I like this approch the best as well if its oemthign you going to use more then once. If not, a simple if works fine as well.