Re: Question about adding time into my master calendar

Yes i tried it out, unfortunately it doesn't quite work like that since in TempCalendar i create the TempDate:

TempCalendar:

LOAD

$(varMinDate) + Iterno()-1 As Num,

Date($(varMinDate) + IterNo() - 1) as TempDate

AutoGenerate 1 While $(varMinDate) + IterNo() -1 <= $(varMaxDate);

and later in my previous calendar i load TempDate as date so YeartoDate for example can read the right format of Date.

MasterCalendar:

Load

TempDate AS Date,

time(Frac(TempDate)) as Time,

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

And in your code you also define date in Stage1:Date($(varMinDate)+IterNo()-1) AS Date,

It seemes to go into a conflict and all the (Bold selection from my old calendar) selections give the same result (First data point is 13k for MonthYear and for WeekYear.Atleast it didn't work. I'll try again, i hope i made a silly mistake . But so far you've done a great job helping me out, cheers!

Re: Question about adding time into my master calendar

Oh i hate to be a burden since i found a bug in it i guess (well i'm pretty sure that you know that everything is counted from 0 so if we make for example 7 days (mon-sun). and i did saw you make -1.But there still is a problem... I will attach also a picture to the reply.

Problem: Some of my values in timetable have an extra measure of time "-" (in all time measures, hours, minutes, seconds, Year, Month, MonthYear and so on).Can you help me fix that problem and we could close this thread.And these millions rows are only 1% of the whole database, else i would upload a example. I also tried to load data with First X-amount SQL SELECT tablename (Qlik reads and finds no errors in my app, but dosent count the First X-amount.