Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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
Highlighted

7 Replies
Highlighted
MVP
MVP

Use class().

Highlighted
Creator III
Creator III

Could you help me out? How to use class?

Highlighted
MVP
MVP

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

Highlighted

Highlighted
Specialist II
Specialist II

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.

Highlighted
Specialist II
Specialist II

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

It helps others to understand the solution....

Highlighted
Creator III
Creator III

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