Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Flag for reducing last not closed month

Good day!

In my model i have periods for two years (2014, 2015) with every dates.

For example, last date in my model is 30.11.2015

I need to make some flag in load script, which will reduce on closed month:

0 - all periods (01.01.2014 - 30.11.2015)

1 - all period without not closed month (Nov 2015)  (01.01.2014 - 31.10.2015)

Please, help.

5 Replies
Anonymous
Not applicable
Author

Not closed month means like this 01.12.2014 - 23.12.2-014?

tresesco
MVP
MVP

Try like:

Load

          Date,

          If(InMonth(Date, Today(), 0), 1, 0) as Flag

kumarkp412
Creator II
Creator II

Hi Andrey,

     As of my understanding, you need to create the two flags as 0,1 and this should be

Closed month- As month ends with even number like 30-11-2015

Unclosed month -As the month ends with the odd number like 31-10-2015.

If my understand is wrong can you please elaborate your question.

Thanks

Kumar

Anonymous
Not applicable
Author

Hi!

In your solution:

0: 01.01.2014 - 31.10.2015.  I need - 01.01.2014 - 30.11.2015

1: 01.11.2015 - 30.11.2015. I need -  01.01.2014 - 31.10.2015

Thanks.

tresesco
MVP
MVP

01.01.2014 - 31.10.2015 - is common to both flags?  You can't flag one date with two flags.