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

Format text colors not consistent

Hi all,

I have created a calendar view and am trying to format the expression text based on the 'Off_Type'.

Here is my formula:

=if(Off_Type = 'Vacation',LightBlue(),if(Off_Type = 'Sick',LightRed(),if(Off_Type = '[Comp Day]',lightGreen(),
if(Off_Type = '[Bereavement / Compassionate]',DarkGray(),
if(Off_Type = '[Other Work Assignment]',DarkGray())))))

Unfortunately, not all days in the calendar are cooperating where the text on 3/2 is red as expected but those on 3/9 "Sick" are not red:

Textformat.PNG

It appears when multiple Off_Types fall on a given day, the formatting doesn't work.  Any information or explanation is much appreciated!

6 Replies
dsharmaqv
Creator III
Creator III

post your app please

adamdavi3s
Master
Master

Hi John,


Can you upload your QVW, maybe scramble a few fields so its not sensitive any more!

adamdavi3s
Master
Master

John,

If it makes life easier I have created a dummy set, how does this differ from yours in the simplest terms?

Also the following formula is a slightly more efficient way of doing this

=pick(match(Off_Type,'Vacation','Sick','Comp Day','Bereavement / Compassionate','Other Work Assignment'),LightBlue(),LightRed(),lightGreen(),DarkGray(),DarkGray())

Not applicable
Author

Here you go...

adamdavi3s
Master
Master

I do not know of a way of doing this I am afraid, you can't format text with different colours within the same cell, qlik just won't do it.

Because you have multiple different off_type, qlik can't work out which one you want which is why it is just black

Not applicable
Author

Shoot...I was afraid of that!