Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I currently working on a dashboard and I am extracting data from an existing file.
I successfully extracted the data but I need to manipulate the field (to produce date fields like Month, Year)
I need tips on how to do this
Please see attachments for clarity..
Best Regards
Akpofure
One last change:
Binary
QuartersMap:
MAPPING LOAD
rowno() as Month,
'Q' & Ceil (rowno()/3) as Quarter
AUTOGENERATE (12);
Temp:
Load
min(CH.DOC.LAST_CHANGED_AT) as minDate,
max(CH.DOC.LAST_CHANGED_AT) as maxDate
Resident TEMP1;
Let varMinDate = Num(Peek('minDate', 0, 'Temp'));
Let varMaxDate = Num(Peek('maxDate', 0, 'Temp'));
DROP Table Temp;
TempCalendar:
LOAD
$(varMinDate) + Iterno()-1 As Num,
Date($(varMinDate) + IterNo() - 1) as TempDate
AutoGenerate 1 While $(varMinDate) + IterNo() -1 <= $(varMaxDate);
MasterCalendar:
Load
TempDate AS CH.DOC.LAST_CHANGED_AT,
week(TempDate) As Week,
Year(TempDate) As Year,
Month(TempDate) As Month,
Day(TempDate) As Day,
YeartoDate(TempDate)*-1 as CurYTDFlag,
YeartoDate(TempDate,-1)*-1 as LastYTDFlag,
inyear(TempDate, Monthstart($(varMaxDate)),-1) as RC12,
date(monthstart(TempDate), 'MMM-YYYY') as MonthYear,
ApplyMap('QuartersMap', month(TempDate), Null()) as Quarter,
Week(weekstart(TempDate)) & '-' & WeekYear(TempDate) as WeekYear,
WeekDay(TempDate) as WeekDay
Resident TempCalendar
Order By TempDate ASC;
Drop Table TempCalendar;
No change... I made adjustments still not date fields....
Please find the sample QVW file.
Can you check and see if this is what you want?