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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

expression error in SET Analysis with variable

Hi

I´m having a syntaxproblem with this Set Analysis

count({<AAR=vCurrentyear,Gruppe={'Tyveri fra borger'} >}JOURNALNR)

the problem lies at the comma after the vCurrentYear

I tried

count({<AAR={vCurrentyear},Gruppe={'Tyveri fra borger'} >}JOURNALNR)

but it doesnt work

20 Replies
Not applicable
Author

I dont have an image om the field but it contains this list

2010

2011

2012

2013

2014

Not applicable
Author

Hi Colin

the Data in the field AAR comes from a SQl database and is formatted as an INT

Colin-Albert
Partner - Champion
Partner - Champion

An image would help as it makes a difference if the list box shows the data as left or right justified.

If the listbox shows

2010

2011

2012

2013

then the data is text.

If the listbox shows

          2010

          2011

          2012

          2013
then the data is numeric

Not applicable
Author

the data is numeric

Colin-Albert
Partner - Champion
Partner - Champion

Do you get data returned from this expression?

     count( {<AAR={$(vCurrentyear)} >} JOURNALNR)

If not, add a textbox showing =$(vCurrentyear) to see that that contains the value you expect. 2014

Not applicable
Author

yes

Not applicable
Author

the textbox shows 2014

Colin-Albert
Partner - Champion
Partner - Champion

Can you add a list box on the Gruppe field and confirm that the value 'Tyveri fra borger' exists

Not applicable
Author

yes

Colin-Albert
Partner - Champion
Partner - Champion

Hi Soren,

>>using yours gives me zeroes

Oops! I missed this reply earlier - the zero means that the set expression is correct, but there are no matching JOURNALNR values to count, hence the value is zero.

Do you get values returned for the expression  count({1 <AAR={'$(vCurrentyear)'}, Gruppe={'Tyveri fra borger'} >} JOURNALNR)

The 1 will cause the expression to ignore all other data selections. If you get data with this set, then view your current selections to identify what values are being filtered in your data.

If the 1 set expression above returns zero, then your data has no Journals for AAR=2014 and Gruppe = 'Tyveri fra borger'