Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
The example, if i start work from the start month 1 Feb 2012, today is 20 Feb 2012. How do i can count the networkday if i want to include Saturday as a networkday. The Result is 17.
How to make the code expression if i want to get this result?
Thanks,
Danny H
This is the true code :
Count({<TRX_DATE_TRX={">=$(=vStartDate)<=$(=vLastDate)"}, WEEKDAY_TRX={'*'} - {'Sun'}>} TRX_DATE_TRX) -
Count({<TRX_DATE_TRX={">=$(=vStartDate)<=$(=Date(Now()))"}, WEEKDAY_TRX={'*'} - {'Sun'}>} TRX_DATE_TRX)
Hi,
Arrive a flag which specifies whether the date is a working day or not. Please check this script
LOAD
TRX_DATE_TRX,
If(TRX_DATE_TRX = 'Sun', 0, 1) AS IsWorkDay
'
'
FROM DataSource;
Now in expression you can simply calculate the work days by
=Sum({<TRX_DATE_TRX={">=$(=vStartDate)<=$(=vLastDate)"} IsWorkDay >)
Also one suggestion never use Now() in expressions it decreases the performance, instead use Today().
Hope this helps you.
Regards,
Jagan.