Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How do i add Names of days of the week to a month calender and paint with other color

Hello,

How do i add days of the week to my month calender and paint with other color to differentiate weekend from normal days of the week. Plz find attached.

Regards

1 Solution

Accepted Solutions
MarcoWedel

maybe like this?:

QlikCommunity_Thread_130491_Pic3.JPG.jpg

hope this helps

regards

Marco

View solution in original post

7 Replies
JonnyPoole
Employee
Employee

The expression based off your date field which has day.month.year values would be like this

=WeekDay(  date#(Date,'D.M.YYYY'))

to color based on a weekday or not , something like

if(  only(WeekDay(  date#(Date,'D.M.YYYY'))) ='Sat' or only(WeekDay(  date#(Date,'D.M.YYYY')))='Sun',  <weekendcolorexpression>,  <weekdaycolorexpression>)

MarcoWedel

test data

MarcoWedel

Hi,

maybe like this?:

QlikCommunity_Thread_130491_Pic2.JPG.jpg

QlikCommunity_Thread_130491_Pic1.JPG.jpg

tabCalendar:

LOAD Date#(Date, 'DD.MM.YYYY') as Date,

// SubField(Date,'.',1) as Day,

// Subfield(Date,'.',2) as Month,

// Subfield(Date,'.',3) as Year,

    Day(Date) as Day,

    WeekDay(Date) as WeekDay,

    Week(Date) as Week,

    Month(Date) as Month,

    QuarterName(Date) as QuarterYear,

    Year(Date) as Year,

  'Quarter '&ceil(month(Date)/3) as Quarter,

  'Half ' & ceil(month(Date)/6) as HalfYear;

LOAD Date(date#(Date,'DD.MM.YYYY'),'DD/MM/YYYY') as Date

FROM [http://community.qlik.com/servlet/JiveServlet/download/594216-121488/Book11.xls]

(biff, embedded labels, table is Sheet1$);

hope this helps

regards

Marco

MarcoWedel

can you describe a bit more how it should look like?

MarcoWedel

maybe like this?:

QlikCommunity_Thread_130491_Pic3.JPG.jpg

hope this helps

regards

Marco

MarcoWedel

thanks.

Div(Day+WeekDay(MonthName)-1,7)

calculates the row number, i.e. days 1 to the first sunday are in the first row, the next 7 days in the second and so forth.

The Dual(' ', ...) part lets this numerical value be displayed as a blank character to hide it, I didn't want row numbers to occur.

regards

Marco

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP