Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
pashok75
Contributor II
Contributor II

YTD Count of Records

Hi All,

I was trying to get data count based on the following flags (N+R-C) for which I achieved already using the following expression formula for which I created a variable vPremType

vPremType

= Num( (Count({<T_PREM_TYPE={'N','R'}>}T_PREM_TYPE)-Count({<T_PREM_TYPE={'C'}>}T_PREM_TYPE))/vNumber,'#,##0')

Now I need to get the count based on the YTD of the same period previous year. But I am not getting no data in display as the formula is wrong somewhere which I could not figure. This is how I am caculating the YTD

sum(if(T_APPR_DT <= AddYears(max(total T_APPR_DT), T_YEAR - Year(max(total T_APPR_DT))), $(vPremType))))

Ashok

1 Reply
marcus_sommer

I think this will be helpful: LYTD

- Marcus