Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear Experts,
I am trying to figure out how to achive a flag for previous year current month to date and flags should appear on all the working days. here the weekends should be excluded. I currently have a flag which has flags on all days including weekends.
any thoughts or ideas here .
Thanks in adavance
When loading your calendar, use code like this:
LOAD ... Date, .... as MTDFlag, If(WeekDay(Date) = 0 or WeekDay(Date) = 6, 0, 1) as WeekDay,
You could use both codes now in a set expression to achieve your result. To permanently modify MTDFlag, then add this preceding load immediately before the above code:
LOAD *, If(MTDFlag And WeekDay, 1, 0) as MTDFlag2, ; LOAD ... Date, .... as MTDFlag, If(WeekDay(Date) = 0 or WeekDay(Date) = 6, 0, 1) as WeekDay,
Thanks for your reply. I tried to do it front end using the set expression, I have considered the workdays field for this. and used variables for Previous Year and Month.
Best Regards
M
When loading your calendar, use code like this:
LOAD ... Date, .... as MTDFlag, If(WeekDay(Date) = 0 or WeekDay(Date) = 6, 0, 1) as WeekDay,
You could use both codes now in a set expression to achieve your result. To permanently modify MTDFlag, then add this preceding load immediately before the above code:
LOAD *, If(MTDFlag And WeekDay, 1, 0) as MTDFlag2, ; LOAD ... Date, .... as MTDFlag, If(WeekDay(Date) = 0 or WeekDay(Date) = 6, 0, 1) as WeekDay,
Thanks for your reply. I tried to do it front end using the set expression, I have considered the workdays field for this. and used variables for Previous Year and Month.
Best Regards
M