3 Replies Latest reply: Feb 20, 2017 6:40 PM by Rob Wunderlich RSS

    Count if less than 30.

    Erick Dameron

      Hi all,

      Still a bit of a newbie when it comes to a lot of this stuff so bear with me.


      I need to set a KPI to count how many of my records are completed within 30 days.


      To complete this I wrote the following expression:

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

      However, instead of returning the count of records within 30 days, it counts everything.


      For example: It should return around 1000, but is returning close to 4000.


      How can I restructure this Chart expression to calculate correctly?


      Any wisdom is greatly appreciated,