Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
palo173
Contributor III
Contributor III

Date variable in background color expression

I try to use variable vStartMonth in  background color expression
vStartMonth = Date(Floor(Monthstart(Today()-1)), 'DD.MM.YYYY')

When I use specific date it works:
If(Count({<work_day={'1'}, Date_1={'1.12.2020'} >}distinct total Date_1)>0, rgb(162,233,171))

When I use variable it does not work:
If(Count({<work_day={'1'}, Date_1={'$(vStartMonth)'} >}distinct total Date_1)>0, rgb(162,233,171))
I tried plenty of tests with variable but everything was wrong.

Could you help me?
Thank you

 

Labels (2)
10 Replies
agigliotti
Partner - Champion
Partner - Champion

let's try this:
=If( Count( {< work_day = {'1'}, Date_1 = {"$(=Date(Floor(Monthstart(Today()-1))+5, 'DD.MM.YYYY'))"} >} distinct total Date_1 ) > 0, rgb(162,233,171) )