Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I know this question must have have been asked a million times but I am currently struggling for some reason with my master calendar which isn't working not sure why it isn't displaying anything for the day, month, week, year and quarter.
here is my code below, I thought I have everything required:
FIrst_Base:
LOAD
Sales,
date(Date#(SalesDate,'DD/MM/YYYY')) as SalesDate,
C,
D
FROM
Sales.xlsx
(ooxml, embedded labels, table is Sheet1);
Mas_Cal:
LOAD
Date(SalesDate) as SalesDate,
Year(SalesDate) as Year,
'Q' & Ceil(Month(SalesDate)/3) as Quarter,
Month(SalesDate) as Month,
Day(SalesDate) as Day,
Week(SalesDate) as Week;
Recu_Load:
Load
Date(MinDate + Iterno() -1) as SalesDate
While(MinDate + Iterno() -1)<=Num(MaxDate);
Additional:
Load
Min(date(Date#(SalesDate,'DD/MM/YYYY'))) as MinDate,
Max(date(Date#(SalesDate,'DD/MM/YYYY'))) as MaxDate
Resident FIrst_Base;
May be this:
FIrst_Base:
LOAD
Sales,
Date(Date#(SalesDate,'DD/MM/YYYY')) as SalesDate,
C,
D
FROM
Sales.xlsx
(ooxml, embedded labels, table is Sheet1);
Mas_Cal:
LOAD Date(SalesDate) as SalesDate,
Year(SalesDate) as Year,
'Q' & Ceil(Month(SalesDate)/3) as Quarter,
Month(SalesDate) as Month,
Day(SalesDate) as Day,
Week(SalesDate) as Week;
LOAD Date(MinDate + Iterno() -1) as SalesDate
While(MinDate + Iterno() -1)<=Num(MaxDate);
LOAD Min(SalesDate) as MinDate,
Max(SalesDate) as MaxDate
Resident FIrst_Base;
If it still doesn't work, I would suggest you to check this and make sure SalesDate actually came in as DD/MM/YYYY
Date(Date#(SalesDate,'DD/MM/YYYY')) as SalesDate,
May be this:
FIrst_Base:
LOAD
Sales,
Date(Date#(SalesDate,'DD/MM/YYYY')) as SalesDate,
C,
D
FROM
Sales.xlsx
(ooxml, embedded labels, table is Sheet1);
Mas_Cal:
LOAD Date(SalesDate) as SalesDate,
Year(SalesDate) as Year,
'Q' & Ceil(Month(SalesDate)/3) as Quarter,
Month(SalesDate) as Month,
Day(SalesDate) as Day,
Week(SalesDate) as Week;
LOAD Date(MinDate + Iterno() -1) as SalesDate
While(MinDate + Iterno() -1)<=Num(MaxDate);
LOAD Min(SalesDate) as MinDate,
Max(SalesDate) as MaxDate
Resident FIrst_Base;
If it still doesn't work, I would suggest you to check this and make sure SalesDate actually came in as DD/MM/YYYY
Date(Date#(SalesDate,'DD/MM/YYYY')) as SalesDate,
It worked you're really good Sunny T!!!
so this was actually the problem
Load
Min(date(Date#(SalesDate,'DD/MM/YYYY'))) as MinDate,
Max(date(Date#(SalesDate,'DD/MM/YYYY'))) as MaxDate
Resident FIrst_Base;