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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

% Attrition not coming in yearly graph

Hi All,

Please find the attached file having scenario which I want to achieve.

I have year column and I am using as dimension in trend chart.

I want to calculate attrition rate for each year.But I am not able to do this.

How can I achieve in Qlikview.

I have written formula as

Count({<Status={'InActive'}>}EmployeeID)/((Count({<Status={'Active'},Year={$(=max(Year))}>}EmployeeID)+Count({<Status={'Active'},Year={$(=max(Year)-1)}>}EmployeeID))/2)

I am not able to use max(year) and max(Year)-1 in trend chart as my dimension is year.

Please help me

Thanks and Regards,

Gaurav

wanigaurav11@gmail.com

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

if year is your dimension in Chart, you can't achieve this by set analysis, as set expressions are evaluated before the aggregation made, so it can't be evaluated row-by-row..

i.e. you can't achieve below.

Year     Last Year

2012     2011

2013     2012

2014     2013

You can do calculation in script to achieve this.

View solution in original post

2 Replies
MK_QSL
MVP
MVP

if year is your dimension in Chart, you can't achieve this by set analysis, as set expressions are evaluated before the aggregation made, so it can't be evaluated row-by-row..

i.e. you can't achieve below.

Year     Last Year

2012     2011

2013     2012

2014     2013

You can do calculation in script to achieve this.

Not applicable
Author

Yeah, I was thinking the same any idea how can I do in script?

Thanks

Gaurav