Skip to main content

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Action-Packed Learning Awaits! QlikWorld 2023. April 17 - 20 in Las Vegas: REGISTER NOW
Showing results for 
Search instead for 
Did you mean: 
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


= 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))))


1 Reply
MVP & Luminary
MVP & Luminary

I think this will be helpful: LYTD

- Marcus