Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am working with some statistical data that is tagged with a data date (this is the date we collected the data). I have created a master calendar to ensure that I see all days during a month rather than just the days we have data for.
I am now trying to do a few calculations. Firstly I did a count of the days we have data which works fine
COUNT
(DISTINCT{$<dayused = {">=$(vMinCalDate)<=$(vMaxCalDate) "}>} dayused)Then I calculated the Calendar Days during that period
Count(DISTINCT Date)
Again this worked fine. But I am unable to calculate the Calendar days minus weekends
count({$<NUM(Weekday)={0,1,2,3,4} >}Date)
I have a Weekday field that was created as part of my master calendar and I have tested IF statements that show that 0 = Mon, 1 = Tues etc, but this expression is not accepted.
Can anyone suggest what is requird?
Regards
Steve
Try
count({$<Weekday = {0,1,2,3,4} >} DISTINCT Date)
or
count({$<Weekday -= {'Sat','Sun'} >} DISTINCT Date)
Look at networkdays in help
I checked out NETWORKDAYS and tried various combinations and I could not make it work unfortunately.
=networkdays($(vMinCalDate),$(vMaxCalDate))
Try
count({$<Weekday = {0,1,2,3,4} >} DISTINCT Date)
or
count({$<Weekday -= {'Sat','Sun'} >} DISTINCT Date)
Thanks very much, this is exactly what I need.
Hi Swuehl!
i was reading this post with much interest.
i have the case whereby i seek the amount of network days between two dates. in this case both are variables.
i have tried with the following without sucess -> count(Networkdays($(EndDate, $(StartDate))
any ideas?
Best Brad