Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
joshdellapietro
Contributor III
Contributor III

Background Color Expression for Holidays

Hello,

I currently have a pivot table showing me sales by week (image 1). My weeks are calculated using the following field, [Shipping Date.autoCalendar.Week] with the field [Shipping Date] just being MM/DD/YYYY. Now, I also have loaded a field called [Holiday Date] which again is in MM/DD/YYYY format. My goal is for holiday weeks to be highlighted in light gray in my pivot table (image 2).

I thought a simple formula would of work like:

IF([Shipping Date.autoCalendar.Week]=[Holiday Date.autoCalendar.Week],lightgray())

But I am not getting any results from this.

 

1 Solution

Accepted Solutions
joshdellapietro
Contributor III
Contributor III
Author

Figured it out, this formula worked:

ONLY(IF([Shipping Date.autoCalendar.Week]=[Holiday Date.autoCalendar.Week],lightgray()))

View solution in original post

5 Replies
settu_periasamy
Master III
Master III

Hi @joshdellapietro ,

Is that holiday date field is linked to your Shipping Date Calendar table?

joshdellapietro
Contributor III
Contributor III
Author

Hi,

No, they are loaded separately. Linking them is an option.

settu_periasamy
Master III
Master III

Ok. Can you just create  a Straight table char with two fields (Shipping date and Holiday Date) and check those date values are matching ?

joshdellapietro
Contributor III
Contributor III
Author

Yes, it allowed me to link the two showing that the date values match.

joshdellapietro
Contributor III
Contributor III
Author

Figured it out, this formula worked:

ONLY(IF([Shipping Date.autoCalendar.Week]=[Holiday Date.autoCalendar.Week],lightgray()))