Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 ioannagr
		
			ioannagr
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hello once again,
I really need help with this.
After I created the Master Calendar, in the UI no date fields are recognized as such.
I can't create master calendar measures in the UI or even use the date range picker.
Why is it that? Any clue?
Thanks,
Ioanna
 dplr-rn
		
			dplr-rn
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		check data model viewer and select the date field and check the tags in preview.
what are the values there? i am assuming it is not date
share your script to create master calendar too and maybe we can help
 ioannagr
		
			ioannagr
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		You are right, the tags are numeric and integer .
Also my script is the following:
QuartersMap:
MAPPING LOAD
rowno() as Month,
'Q' & Ceil (rowno()/3) as Quarter
AUTOGENERATE (12);
Temp:
Load
min(donationdate) as minDate,
max(donationdate) as maxDate
Resident blooddonor_questionnaire;
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 donationdate,
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;
 dplr-rn
		
			dplr-rn
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		 ioannagr
		
			ioannagr
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Nope, still doesn't get recognized as a date field. What should i do?
Maybe change the format of the date in the Main script in the load editor?
I'm clueless here 😬
also, thanks for the link!
 dplr-rn
		
			dplr-rn
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		sorry yes. change everywhere with Date() function
 ioannagr
		
			ioannagr
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		I'm sorry, I don't get what everywhere means, everywhere I see "TempDate"?
Also in the linked table?
Also this one format in the picture attached for the date and timestamp?
Ah, thanks, hope I figure this out 🙂
 dplr-rn
		
			dplr-rn
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Whereever you have donationdate. that should be converted into date format
 ioannagr
		
			ioannagr
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Nope, still doesn't work. 😞
But thanks for your help. Seriously appreciated.
Ioanna
