Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

massimofavaro
New Contributor III

Why this expression is working while this other won't

Hello everyone.

I'm trying to understand why this formula

"COUNT({<[subscribe_date.autoCalendar.Year] = {$(vMaxSubscribeYear)}>}subscribe_date)"

is working while

"COUNT({<YEAR([subscribe_date.autoCalendar.Date]) = {$(vMaxSubscribeYear)}>}subscribe_date)" isn't.

YEAR([subscribe_date.autoCalendar.Date] shouldn't be equal to [subscribe_date.autoCalendar.Year]?

What am I misunderstanding?

1 Solution

Accepted Solutions

Re: Why this expression is working while this other won't

You are not allowed to use functions such as Year(), Sum(), Min() on the left hand side of the set modifier... you can only use field names

4 Replies

Re: Why this expression is working while this other won't

You are not allowed to use functions such as Year(), Sum(), Min() on the left hand side of the set modifier... you can only use field names

massimofavaro
New Contributor III

Re: Why this expression is working while this other won't

Now it's clearier, thanks. Quite bothersome IMHO. May I use variables on the left side of the set modifier?

Re: Why this expression is working while this other won't

If they evaluate to a field name... then yes... but if not... then you can't

massimofavaro
New Contributor III

Re: Why this expression is working while this other won't

Ok, understood, many thanks.

Community Browser