Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi team,
Thanks in advance for your attention .
Here my problem statement is that I want to have previous week Thursday date if in my table if today is not Thursday.
Means my dimension should have date of Thursday only ,if today is Monday than it should show previous Thursday's date.
Thanks,
Try
=if(Weekday(Today())=3,Today(),date(Today()-(num(WeekDay(today()))+4)))
Try
=if(Weekday(Today())=3,Today(),date(Today()-(num(WeekDay(today()))+4)))
=date(date#(Today(),'MM/DD/YYYY')-7,'DD/MM/YYYY')
use this
Hi,
Sorry
I am not clear with your question could you please elaborate ?
Also weekday() Function will return only string values not numeric values.
So weekday(Today()) will only return today's day name and not 3 or 4.
Thanks.
Weekday() is a dual function, you can read more about it in help
Hi,
one solution might be:
Date(Floor(YourDate,7,5))
tabDates:
LOAD *,
Date(Floor(YourDate,7,5)) as PreviousThursday;
LOAD Date(YearStart(Today())+RecNo()-1) as YourDate
AutoGenerate 50;
hope this helps
regards
Marco
Hi Marco,
Thanks for your reply, but I have not to use any base dimension, means I have to add one dimension which should so Thursday's date without dependency on any dimension.
Thanks,
Pooja
Hi,
that's just been an example to demonstrate this expression's results.
Instead of
Date(Floor(YourDate,7,5))
you could also use
Date(Floor(Today(),7,5))
hope this helps
regards
Marco