Skip to main content
Announcements
Happy New Year! Cheers to another year of collaboration, connections and success.
cancel
Showing results for 
Search instead for 
Did you mean: 
JamesMF82
Contributor II
Contributor II

Expressions using Count if and Max Date

Hi all,

I have an issue at the moment where I am trying to use Count with an If statement on a Max date and am having a few issues.

I have the following expression which returns the number of days since the last recorded invoiced date for a visit based on todays date. This works fine.

=if(ClientStatus <> 'Permanent Inactive' and VisitInvoiceStatus = 'Invoiced Visit'
                and num(Today()-max(VisitStartDate))>20, num(Today()-max(VisitStartDate)))

 

However if I try to add a count to the front I'm getting nothing, also when adding the Max(VisitStartDate) into a variable and calling it that way, it's just returning Zeros.

Any help would be great, thank you!

1 Reply
JeanColeti
Contributor III
Contributor III

Hi, idk if I understant  correctly, it'll be great understand better your data.

But I think you don't need an IF.

Try count with a set analisys.

 

Count( {< ClientStatus -= {'Permanent Inactive'}, VisitInvoiceStatus = {'Invoiced Visit'},  num(Today()-max(VisitStartDate)) = {">20"} >} Visits)