Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
erickd1190
Contributor III
Contributor III

Count number of services between 30, and 60 days old.

HI All,

Let me thank you all in advance on this. I appreciate any help you can provide.

I am working with chart expressions and not in the data load editor.

I need to count the number of services that occurred between 152-182 days ago and am having some trouble.

Since chart expressions do not allow nested expressions, I am unsure how to solve this.

What I am trying right now is this:

SUM({$<visittype={"Strengths and Needs"}>}if((today()-visit_day>152,1,0)

This gives me a count of everything that is greater than 152 days old but I need to stop counting everything that is 182 days or older for this KPI.

Thoughts?

Best,

Erick

1 Solution

Accepted Solutions
sunny_talwar

May be this:

Sum({$<visittype={"Strengths and Needs"}>}if((today()-visit_day>152 and today()-visit_day < 182,1,0)

View solution in original post

2 Replies
sunny_talwar

May be this:

Sum({$<visittype={"Strengths and Needs"}>}if((today()-visit_day>152 and today()-visit_day < 182,1,0)

erickd1190
Contributor III
Contributor III
Author

Sunny this is great!

I had tried the and function similar to its use in Excel like this and when it didn't work, I wrote it off:

SUM({<visitype={"Strengths and Needs"}>}if(AND((today()-visit_day>152,TODAY()<182),1,0)

Thank you!