Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Logic Problem

Hello,

I have 5 years of data and calculated YTD Headcount. As per the calaculation the data is correct and matched but now I am going through a problem. I need the headcount till date i.e if I Click on 2014-2015,the headcount should be starting from 2010-2011 and till 2014-2015 but unfortunately as per the YTD logic,the data shown is only of 2014-2015 but I need the headcount data from the starting of 2010-2011 till 2014-2015.

Please help me out with logic.

Thanks and Regards

Atul

3 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

If you have a date field then all you need to do is.

Count({<Date = {"<=$(=Max(Date))"},Year = , Month=>}Employee)

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
er_mohit
Master II
Master II

What expression you are currently using to calculate YTD Headecount.

Not applicable
Author

YTD Logic=count({<%Date={">=$(=vCurrYear) <=$(=vCurrEnd)"}>}%Key_EmpID)

Actually i want a cumulative count till starting from 2010-11 till 2014-2015.

for example :

I have following data

2010-2011 = 25 (Headcount)

2011-2012 = 50 (headcount)

2012-2013 = 50 (headcount)

2013-2014 =100 (headcount)

2014-2015 =150 (headcount)

if I click on 2014-2015 by using my logic then the data is showng YTD i.e 150 (headcount) but i want a cumulative data i.e it must show the count of all the years including the current year (375).