Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
stuwannop
Partner - Creator III
Partner - Creator III

Networkdays calculation and date flags

Hi All

Hope you can help.

I have a list of dates in a table running from 1st Jan 2010 to date. I have created a calendar so some dates will be flagged if they fall within the financial year to date, starting 1st April 2013. So what I'm looking at is a table like this:

DateFYTDFlag
31/03/20130
01/04/20131
02/04/20131
etc.etc...
30/06/20131
01/07/2013

0

Now what I need to do is is show the earliest and the latest dates in that range - at this point in time that would be 1st April 2013 and 30th June 2013. I would then calculate the networkdays once I have those two dates. I'm ok with the network days part, but how do I get the "min" and "max" dates based on the FYTD flag equalling 1.

I hope that explains what I'm after - thanks in advance for any help.

Stu

1 Solution

Accepted Solutions
Not applicable

max({<FYTDFlag={'1'}>} Date)

min({<FYTDFlag={'1'}>} Date)

View solution in original post

4 Replies
tresesco
MVP
MVP

May be this:

forMax = FirstSoretdValue({<FYTDFlag={'1'}> Date, -Date}

forMIn = FirstSoretdValue({<FYTDFlag={'1'}> Date, Date}    

Thanks.

stuwannop
Partner - Creator III
Partner - Creator III
Author

Hi tresesco

Thanks for your response. It's pretty close i think but it's not quite working. If I use:

Firstsortedvalue(Date,Date) it will return the earliest(first) date in my data set - great so far. It's only when I enter the set analysis part that it returns a blank.

So, Firstsortedvalue({<FYTDFlag = {'1'}>} Date,Date) does not return a value. Syntax checker says it's ok.

Thoughts?

Stu

Not applicable

max({<FYTDFlag={'1'}>} Date)

min({<FYTDFlag={'1'}>} Date)

stuwannop
Partner - Creator III
Partner - Creator III
Author

awesome - thanks Alex - I don't know what I was doing wrong but I'd got in my head that Max and Min don't work with set analysis.

Cheers

Stu