Qlik Community

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

IMPORTANT security patches for GeoAnalytics Server available to download: READ DETAILS
Showing results for 
Search instead for 
Did you mean: 
Contributor II
Contributor II

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 (3)
10 Replies

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) )