Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Experts,
I am using expression to show total no. of employees joined as like below
" Sum({<Date={'>=$(=MonthStart(Max(Month), -2))<=$(=MonthEnd(Max(Month)))'}>}Employee).
How to write expression for Avg Employees Joined for Month?
Thanks
Then if you have a Calendar table then add one column like below
Calendar:
LOAD
*,
Day(MonthEnd(DateFieldName)) AS DaysInMonth
FROM DataSource;
Now in your expression use like below
=Sum({<Date={'>=$(=MonthStart(Max(Month), -2))<=$(=MonthEnd(Max(Month)))'}>}Employee)/Only({<Date={'>=$(=MonthStart(Max(Month), -2))<=$(=MonthEnd(Max(Month)))'}>}DaysInMonth)
Hope this helps you.
Regards,
jagan.
HI,
Do you want Average employees per month? In your set analysis expression you took for 3 months so if you divide it by 3 then you will get the monthly average.
=Sum({<Date={'>=$(=MonthStart(Max(Month), -2))<=$(=MonthEnd(Max(Month)))'}>}Employee)/3
If this is not you are looking then come up with some sample numbers and your expected output.
Regards,
Jagan.
I want to show daily average for month
Then if you have a Calendar table then add one column like below
Calendar:
LOAD
*,
Day(MonthEnd(DateFieldName)) AS DaysInMonth
FROM DataSource;
Now in your expression use like below
=Sum({<Date={'>=$(=MonthStart(Max(Month), -2))<=$(=MonthEnd(Max(Month)))'}>}Employee)/Only({<Date={'>=$(=MonthStart(Max(Month), -2))<=$(=MonthEnd(Max(Month)))'}>}DaysInMonth)
Hope this helps you.
Regards,
jagan.
Its Working