Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
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'))

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.