Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Highlighted
Not applicable

Another color on specific bar in bar chart

Hi all,

I have a bar chart with date as dimension and count(VAR) for expression.  What I would like to do is using different color for Saturdays and Sundays. 

I have SET DayNames='Mon;Tues;Wed;Thu;Fri;Sat;Sun';


Anyone?


// Fjalar

Tags (2)
1 Solution

Accepted Solutions
Employee
Employee

Re: Another color on specific bar in bar chart

Another technique is to grab the 'Sat' or 'Sun' from the date as follows:

if(

     right(Date (Date,'WWW'),3) ='Sat'

     or

     right(Date (Date,'WWW'),3) ='Sun'

     ,

     <weekendcolor>,

     <weekdaycolor>

)

View solution in original post

5 Replies

Re: Another color on specific bar in bar chart

Hi FJalar,

In expressions tab, expand the expression and set in Background Color:

If(weekday(DateField)>=5, Red(), Green())

Switch red and green for the colours you want.

Employee
Employee

Re: Another color on specific bar in bar chart

Another technique is to grab the 'Sat' or 'Sun' from the date as follows:

if(

     right(Date (Date,'WWW'),3) ='Sat'

     or

     right(Date (Date,'WWW'),3) ='Sun'

     ,

     <weekendcolor>,

     <weekdaycolor>

)

View solution in original post

Not applicable

Re: Another color on specific bar in bar chart

Thanks,

Here I got Mondays and Tuesdays colored. 

Not applicable

Re: Another color on specific bar in bar chart

Thanks!  I'll use this solution.

// Fjalar

Employee
Employee

Re: Another color on specific bar in bar chart

Cool. i rewrote it once or twice before posting and just realized it could be simplified a bit more:

if(

     Date (Date,'WWW') ='Sat'

     or

     Date (Date,'WWW') ='Sun'

     ,

     <weekendcolor>,

     <weekdaycolor>

)