Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi all,
I have a dashboard used for demo purposes. one of the columns on it is a date column (expiration date). the data comes from an excel file and I have to update the dates column every several months to make sure they are in the future.. is there anyway I can create a dynamic column to show random dates within the next year or two years?
Thanks,
Alec
May be do this:
Table:
LOAD Date(Today() + Floor(Rand()*365)) as FutureDates
AutoGenerate 50;
May be do this:
Table:
LOAD Date(Today() + Floor(Rand()*365)) as FutureDates
AutoGenerate 50;
Hi Alec,
check out the attached thread, tweaking the start and end as required.
Andy
For one year use 365, for two you can use 730 and so on....
Table:
LOAD Date(Today() + Floor(Rand()*365)) as FutureDates
AutoGenerate 50;
HTH
Best,
Sunny
Try this expression:
Date(Num(Today()) + 365 - DayNumberOfYear(Today()) + Rand()*732)
tmp_MaxDate:
Load min(OrderDate) as mindate,
max(OrderDate) as maxdate
from excel;
LET vMinDate = Peek('mindate',0,'tmp_MaxDate');
LET vfutureDate = today()+90;
LET vMaxDate = Peek('maxdate',0,'tmp_MaxDate');
drop table tmp_MaxDate;
//To get the calendar from your minimum date to maximum date +90 days
//********************* Temporary Calendar ***********************//
tmp_CALENDAR:
LOAD
Date($(vMinDate) + RowNo() - 1) AS tmp_Date
AUTOGENERATE
$(vMaxDate) + $(vfutureDate ) + 1;
Thank you all!
Not a problem, glad we were able to help.
Best,
Sunny