Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am trying to create a calendar object . using below code
Calendar:
load
(date(date#(20123112,'YYYYDDMM')+recno())) as [Calendar Date]
autogenerate 365;
this generates the calendar for 1 year i.e is 2013 . I need to generate for for multiple year . Please can yo help .
I trie dputting For loop . but some error is coming .
Thanks
Medha
hii
if you making calender virtually i.e master calender then try this code
LET vDateMin = Num(MakeDate(2006,1,1));
LET vDateMax = Floor(DayEnd(Today()));
LET vDateToday = Num(Today());
TempCalendar:
LOAD
$(vDateMin) + RowNo() -1 AS DateNumber ,
Date($(vDateMin) + RowNo() -1) AS TempDate
AUTOGENERATE 1
WHILE $(vDateMin)+IterNo()<= $(vDateMax);
LOAD
Date(TempDate,'DD-MM-YYYY')as TempDate,
Day(TempDate) AS CalendarDayOfMonth,
YearName(TempDate,0,2)as FiscalYear,
Year(TempDate) AS YTD
RESIDENT TempCalendar ORDER BY TempDate ASC;
DROP TABLE TempCalendar;
**************************************************************************************8
if you have a field of date in table i.e transaction table then try this
load *,
day(DATE) AS Day,
Month(DATE)AS Month,
yeARNAME(DATE,0,2) as FinancialYear,
'Q' & Ceil(Month(DATE)/3) as Quarter,
Dual(Year(DATE) & '-Q' & Ceil(Month(DATE)/3), Year(DATE) & Ceil(Month(DATE)/3)) as YearQtr;
LOAD
date(Date#(DATE,'DD.MM.YYYY')) as date,
DATE ,
quantity
from table;
here DATE is my field
Acommon code used maximum of times
I have created a table Calendar having [calendar Date].
now i want to pass the value of this [calendar date] to a variable . beacuse i need to compare a date field in one of the qvd to display data for calendar date.
I am lil new to this tool ..
is there anyway to pass a field value to a variable because if i directly compare to the {calendar date ] Field . It will give error field not found as this field is not included in QVD.
Thanks
Medha