Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
dhavalvyas
Contributor III
Contributor III

while selecting 1st and 3rd sat and sunday it should show holiday

Hi,

I have raw data for overall 2 years.I want some logic related to leave.that is while selecting 1st and 3rd sat and sunday it should show holiday ? can anyone suggest any solution related to this scenario ?

4 Replies
techvarun
Specialist II
Specialist II

Check the attached.

I have created a flag yes for first and third Saturday every month and for all Sundays.

If you want to add any months you can do it on the edit script.

Thanks

luismadriz
Specialist
Specialist

Hi Dhaval,

Not 100% sure I understood your requirement but this may help if it's just about posting 'Holiday' for 1st and 3rd weekend of every month

If((Day(DateField)<=7 OR (Day(DateField) >= 15 AND Day(DateField) <= 21)) AND WeekDay(DateField,5)<=1,'Holiday') as Leave

I hope his helps,

Cheers,

Luis

luismadriz
Specialist
Specialist

Hi Dhaval,

Just curious to see how did you go.

Remember to close it when you're done (Correct / Helpful)

Qlik Community Tip: Marking Replies as Correct or Helpful

Cheers,

Luis

luismadriz
Specialist
Specialist

Hi,

Just wondering to know how you went about this one,

Cheers,

Luis

PS. When applicable please mark the appropriate replies as Correct. This will help community members know which discussions have already been addressed and have a possible known solution. Please mark replies as Helpful if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads as Helpful if you feel additional info is useful to others