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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
scarafias
Contributor
Contributor

Variables in set expression

Hi Community,

I have a variable defined in the following manner:

count( $1
{<
field1 = {"Value1"},
field2 = {$2},
[Date1.Calendar.Year] = {$3} ,
[Date1.Calendar.MonthNro] = {$4},
[Date1.Calendar.Month]=,
field3 = {$5},
field4={"Value2"}
>} DISTINCT field5)

I define a metric like this:

$(vVariable(  ,"*",2021,1,"*"))

This returns an empty count, despite having records with Date1 in January 2021. There is an additional date field (Date2) in the data, with the same format as Date1, and if I replace Date1 by Date2 in the variable then the count works.

Any thoughts? Thanks.

0 Replies