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

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
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.

Labels (1)
1 Solution

Accepted Solutions
7 Replies
tresB
Champion III
Champion III

Use class().

MuraliPrasath
Creator III
Creator III
Author

Could you help me out? How to use class?

tresB
Champion III
Champion III

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

robert_mika

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