Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
Use class().
Could you help me out? How to use class?
Theoritical you can learn from help or reference manual. For this scenario/practical - attach your sample qvw.
look at this example
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.
Always try to close the thread by providing Correct or Helpful answer tag to the replies....
It helps others to understand the solution....
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