Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
MuraliPrasath
Creator III
Creator III

HR Dashboard Question.

Hi,

I'm in the middle of HR Dashboard Project. Need help !! of  "Age Distribution chart".

I've Emp ID, Name, Department, BirthDate, HireDate and so on.

How to write a expression to make out these.

1 Solution

Accepted Solutions
7 Replies
tresesco
MVP
MVP

Use class().

MuraliPrasath
Creator III
Creator III
Author

Could you help me out? How to use class?

tresesco
MVP
MVP

Theoritical you can learn from help or reference manual. For this scenario/practical - attach your sample qvw.

robert_mika
Master III
Master III

look at this example

Re: Averageif(s)

Anonymous
Not applicable

First of all calculate Age for all employees via age function in script only.

example

age(today(),BirthDate) as EMP_AGE

where BirthDateshould be in date format.

Now Create a calculated dimension as

Class(EMP_AGE,5,'x')

Now whatever expression you have , you can provide and check your chart.

Anonymous
Not applicable

Always try to close the thread by providing Correct or Helpful answer tag to the replies....

It helps others to understand the solution....

MuraliPrasath
Creator III
Creator III
Author

I figured it out !!

LOAD *,

if(ActiveHC.Age>=0 and ActiveHC.Age<=20,'0-20 Age',

if(ActiveHC.Age>=21 and ActiveHC.Age<=25,'21-25 Age',

if(ActiveHC.Age>=26 and ActiveHC.Age<=30,'26-30 Age',

if(ActiveHC.Age>=31 and ActiveHC.Age<=35,'31-35 Age',

if(ActiveHC.Age>=36 and ActiveHC.Age<=40,'36-40 Age',

if(ActiveHC.Age>=41 and ActiveHC.Age<=45,'41-45 Age',

if(ActiveHC.Age>=46 and ActiveHC.Age<=50,'46-50 Age',

if(ActiveHC.Age>=51 and ActiveHC.Age<=55,'51-55 Age',

if(ActiveHC.Age>=56 and ActiveHC.Age<=60,'56-60 Age',

if(ActiveHC.Age>=61 and ActiveHC.Age<=65,'61-65 Age','66 + Age')))))))))) as Age