Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
thabo2g5
Contributor III
Contributor III

calendar not right

Hi everyone ,

i'm having a problem with my calendar especially january , the 1st start at the bottom (see attached photo)

This is my calendar that i'm using for the calendar please help

MasterCalendar:

LOAD *,

      If(WeekDay <5, 1,0) as IsWorkingDay,

     If(WeekDay = 5, 1,0) as IsSaturday,

     If(WeekDay = 6,1,0) as IsSunday;

LOAD

  TempDate AS start_date,

(Year(TempDate)*12+0) +(Month(TempDate)+0) as Cal_Link,

  Year(TempDate) AS Year,

  Day(TempDate) As Day,

  Week(TempDate) as Week,

'Q' & Ceil(Month(TempDate)/3) as Quarter,

  Month(TempDate) AS Month,

  Weekday(TempDate) AS WeekDay,

  inyeartodate(TempDate, maxdate, 0) * -1 AS CurYTDFlag,

  inyeartodate(TempDate, maxdate, -1) * -1 AS LastYTDFlag

;

//=== Generate a temp table of dates ===

LOAD

  date(mindate + IterNo()) AS TempDate

  ,maxdate // Used in InYearToDate() above, but not kept

WHILE mindate + IterNo() <= maxdate

;

//=== Get min/max dates from fact table ===/

LOAD

  min(Date)-1 as mindate,

  max(Date) as maxdate

RESIDENT Incidents;

Dimensions:

weekday

week

expressions:

= '  ' & Day

& chr(10) & chr(10) & concat(Country, chr(10))

1 Solution

Accepted Solutions
thabo2g5
Contributor III
Contributor III
Author

I found he Solution i was suppose to Set BrokenWeeks=1

View solution in original post

3 Replies
petter
Partner - Champion III
Partner - Champion III

This is because Sunday the 1st of 2017 belongs to week number 52 of 2016. Using Week as your dimension will leave the 1st of January as the last row....

thabo2g5
Contributor III
Contributor III
Author

I found he Solution i was suppose to Set BrokenWeeks=1

thabo2g5
Contributor III
Contributor III
Author

Thank you for your Reply i found the solution from qlikview help BrokenWeeks ‒ QlikView