Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
mszuberl
Contributor III
Contributor III

Master Calendar

Hi,

Can someone help me with this issue?

In the attached picture, you can see that not all time tamps in the master calendar have yer, month, etc. associated with them.

Also, although I load DISTINCT, I see duplicates (row 3 and 4).

My calendar script is here:

Master_Calendar_Link_Table:

Load Distinct

ID as key_Calendar,
Timestamp(round("Scan_Completed_DT", (1/24))) as Date

Resident DATATABLE;

MinMaxDates: 
LOAD Floor(Min(TimeStamp(Date, 'MM/DD/YYYY hh:mm'))) AS MinDate,  
Floor(Max(TimeStamp(Date, 'MM/DD/YYYY hh:mm'))) AS MaxDate 
RESIDENT Master_Calendar_Link_Table; 

LET vMinDate = FieldValue('MinDate', 1); 
LET vMaxDate = FieldValue('MaxDate', 1);  

DROP TABLE MinMaxDates;   

CalendarTemp: 
LOAD
     TimeStamp($(vMinDate) + (RecNo()/24) + (IterNo() - 1)) AS AddedTimeStamp
AUTOGENERATE 24 WHILE Num($(vMinDate) + IterNo() -1) <= Num($(vMaxDate)); 

MasterCalendar:
LOAD
AddedTimeStamp AS Date,  
Year(AddedTimeStamp) AS Year,
month(AddedTimeStamp) AS Month,
day(AddedTimeStamp) AS Day,
hour(AddedTimeStamp) AS Hour,
weekday(AddedTimeStamp) AS Weekday
Resident CalendarTemp;

Drop table CalendarTemp;

11 Replies
mszuberl
Contributor III
Contributor III
Author

Rob, thank you for your congratulations and all help so far!

I may have figured this out, while working on a sample .qvw for you.

Anyways, the .qvw is attached. I believe the master calendar is correct now.

One last question though - as I make selections in the data, not all dimension will have all dates in master calendar associated with them, thus gaps in the time axis will be present.

Is there a way in QV to force showing all values on the time axis, despite not having data for them?

Sincerely,

Marcin

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Your sample seems to show all Dimensions (you've checked "Show All Values" and unchecked "Suppress Zero Values"). Can you provide a selection scenario and a screenshot of your issue?

-Rob

http://masterssummit.com

http://qlikviewcookbook.com