Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

andreyfcdk91
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
balrajahlawat
Not applicable

Re: Flag for reducing last not closed month

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

tresesco
Not applicable

Re: Flag for reducing last not closed month

Try like:

Load

          Date,

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

kumarkp412
Not applicable

Re: Flag for reducing last not closed month

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

andreyfcdk91
Not applicable

Re: Flag for reducing last not closed month

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
Not applicable

Re: Flag for reducing last not closed month

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