11 Replies Latest reply: Aug 9, 2012 12:39 PM by ioannis giakoumakis

# Pick a date

Hi All,

Hope all doing well.

I am stuck and I need help.

1. I have calendar and i want to pick a previous day of the row i am processing. If i am processing 07/05/2012, i want to pick 07/03/2012 as previous date because 07/04/2012 is Holiday. If i am processing. I want to skip holidays and week ends. How can I achieve that.

2. I want to get the diff of sum(today's amt - previous day amt) in chart excluding holidays and weekends. I hope it can be dome by set analysis

• ###### Re: Pick a date

In both cases you will need to tell QlikView which dates are holidays and which are not. So maybe this discussion will help you towards that direction :

http://community.qlik.com/message/182603#182603

• ###### Re: Pick a date

Thank you. I looked at the post. I think my question is little different then in that post. i searched many post in forum, but not able to find it helpful. May be example would help.

Thanks...

• ###### Re: Pick a date

sure an example would help but this is a simple question :

How do you let Qv know that 07/04/2012 is Holiday ?

Do you have an extra field for that?

• ###### Re: Pick a date

It is in the table

Holiday:

Inline [

Holidate, HolidayName

07/04/2012, Indepence day

09/03/2012, labor day

];

Thanks

• ###### Re: Pick a date

you must construct a single table holding the holiday information and then use the Above function to check the dates. My example checks up to 4 previous rows, add more if statements, if you need to check further up. I could not think of a more efficient way.

see attached example

• ###### Re: Pick a date

Thank you, but it not getting me the result i want. If it 07/05/2012 then it should give 07/03/2012, means prevoius available date before holiday

• ###### Re: Pick a date

so it does.

In my example, for 07.07.2012 it gives 04.07.2012 which is the previous available date which is not a holiday. But maybe I have not understood well.

• ###### Re: Pick a date

Hi May be I have not explained properly. Please see example below. I want to pick the same date for normal date other than holiday or week end. If monday is holiday then it should pick prevoius Friday's date or Monday's date.

 Date Detail Picked Date - 7/2/2012 7/2/2012 7/3/2012 7/3/2012 7/4/2012 Holiday 7/3/2012 7/5/2012 7/5/2012 7/6/2012 7/6/2012 7/7/2012 Weekend 7/6/2012 7/8/2012 Weekend 7/6/2012 7/9/2012 7/9/2012

Thanks

• ###### Re: Pick a date

Ok, luckily a small change!

see attached

• ###### Re: Pick a date

Thanks,

It is like getting prevoius business days.