Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Anlaysis

Hi Community,

I have employee Joining date field and current date(Period) field i want set analysis for  number of total from employees joining date to current date(Period).

Thanks in advance.

18 Replies
ajaykumar1
Creator III
Creator III

Hi,

year(today())-year(joining date)

PrashantSangle

Hi,

as Manish suggested Age() gives you desired result.

then write

Year(Today())-Year(Date(Date#(JoiningDate),'DD/MM/YYYY'),'DD/MM/YYYY')

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Not applicable
Author

Hi Max i used this expression but it not working any other solution.


anbu1984
Master III
Master III

Can you post app which you tried

Not applicable
Author

Hi

Ajay has given the correct solution.

year(today())-year(joining date)

Please find attachment.

Not applicable
Author

Hi Ajay,

I got yearwise count ok,but i also want month,day wise calculation.

that means how many years,months and  days?

MK_QSL
MVP
MVP

Try below expression ....

=Age(Today(),[Joining date]) &' Years '&(If(Day(Today()) >= Day([Joining date]), MOD((Year([Joining date])*12+Month(Today()))-(Year([Joining date])*12+Month([Joining date])),12),If(MOD((Year([Joining date])*12+Month(Today()))-(Year([Joining date])*12+Month([Joining date])),12) = 0, 11 , MOD((Year([Joining date])*12+Month(Today()))-(Year([Joining date])*12+Month([Joining date])),12)-1)) )&' Months '&(if(Day(Today()) >= Day([Joining date]), Day(Today())- Day([Joining date]), Today() - AddMonths([Joining date],12*AgeYears + If(MOD((Year([Joining date])*12+Month(Today()))-(Year([Joining date])*12+Month([Joining date])),12) = 0 , 11, MOD((Year([Joining date])*12+Month(Today()))-(Year([Joining date])*12+Month([Joining date])),12)-1))))&' Days'

ajaykumar1
Creator III
Creator III

Hi,

Manish expression working properly and i tested its working.

=Age(Today(),[Joining date]) &' Years '&(If(Day(Today()) >= Day([Joining date]), MOD((Year([Joining date])*12+Month(Today()))-(Year([Joining date])*12+Month([Joining date])),12),If(MOD((Year([Joining date])*12+Month(Today()))-(Year([Joining date])*12+Month([Joining date])),12) = 0, 11 , MOD((Year([Joining date])*12+Month(Today()))-(Year([Joining date])*12+Month([Joining date])),12)-1)) )&' Months '&(if(Day(Today()) >= Day([Joining date]), Day(Today())- Day([Joining date]), Today() - AddMonths([Joining date],12*AgeYears + If(MOD((Year([Joining date])*12+Month(Today()))-(Year([Joining date])*12+Month([Joining date])),12) = 0 , 11, MOD((Year([Joining date])*12+Month(Today()))-(Year([Joining date])*12+Month([Joining date])),12)-1))))&' Days'


Thanks Manish its very helpfull to me also.

Not applicable
Author

Please find attachment.