Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Variables not working in Set Analisys in QV 11

Hi,

I found out a strange thing in QV 11.

I have a chart with this expression -

=SUM({$<RECORD_DATE={">$(vToday)"}>} COUNT)

In QV 10, it worked nicely.

But in QV 11 the expression isn't working at all.

If I change it to - =SUM(if(RECORD_DATE>$(vToday),COUNT,0)) then everything is working fine.

After I saw this, I looked at more objects that use variables in set analisys, and they don't work as well.

Is this a known bug?

Is there any solution?

1 Solution

Accepted Solutions
erichshiino
Partner - Master
Partner - Master

Hi,

In the past I had problems with date formats in set analysis.I'm not sure if this can be your case.

I used to create a field where the date is a simple integer. In script, this can be done with a simple num():

Load ..

RECORD_DATE,

num(RECORD_DATE) as nDate

...

Then, vToday would also be a number:

vToday = num(today() )  ;

Thus, set analysis will become:

=SUM({$<nDate={">$(vToday)"}>} COUNT)

Hope this helps,

Erich

View solution in original post

3 Replies
Not applicable
Author

Try adding an equals sign to the dollar sign expansion like:

=SUM({$<RECORD_DATE={">$(=vToday)"}>} COUNT)

erichshiino
Partner - Master
Partner - Master

Hi,

In the past I had problems with date formats in set analysis.I'm not sure if this can be your case.

I used to create a field where the date is a simple integer. In script, this can be done with a simple num():

Load ..

RECORD_DATE,

num(RECORD_DATE) as nDate

...

Then, vToday would also be a number:

vToday = num(today() )  ;

Thus, set analysis will become:

=SUM({$<nDate={">$(vToday)"}>} COUNT)

Hope this helps,

Erich

Not applicable
Author

It worked nicely thanks!