Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

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
erich_shiino
Honored Contributor

Variables not working in Set Analisys in QV 11

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

3 Replies
Not applicable

Variables not working in Set Analisys in QV 11

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

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

erich_shiino
Honored Contributor

Variables not working in Set Analisys in QV 11

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

Variables not working in Set Analisys in QV 11

It worked nicely thanks!

Community Browser