Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys. I've written the following piece of code which works fine in a Qlikview text box
=date(today()+if(weekday(today())='Mon','4',
if(weekday(today())='Tue','3',
if(weekday(today())='Thur','1',
if(weekday(today())='Fri','0',)))))
This piece of code tells me what date the last day of the current working week is. I'd like to include this in the main code of the qlikview document so i can refer to it and don't have to repeat it over and over again. I've tried the following
date(today()+if(weekday(today())='Mon','4',
if(weekday(today())='Tue','3',
if(weekday(today())='Thur','1',
if(weekday(today())='Fri','0',))))) as [LastDay]
However this spits up an error.
Can anyone help me out?
Try something like
Date(floor(WeekEnd(today(),0,-2)))
to calculate your last day of the working week.
Try something like
Date(floor(WeekEnd(today(),0,-2)))
to calculate your last day of the working week.