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

Announcements
Independent validation for trusted, AI-ready data integration. See why IDC named Qlik a Leader: Read the Excerpt!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Using a variable within a set analysis expression

Hello,

I am fairly new to Qlikview and have been playing around with set analysis.

I have created a variable called vMonthCurrent which is based upon the following formula: Upper(Month(Today())).

My load file contains a year's worth of data JAN through to JUN and I have one chart showing this cumulative position.

However, I cannot get a second chart working where I just want to show data for the current month.

To filter the chart I have tried creating an expression as follows: =Sum({$<BOOK_MONTH=$(vMonthCurrent)>}TOTAL_REVENUE).

I am getting an error in expression, if I ignore this I get an error in the table 'Allocated Memory Exceeded'.

If I enter the expression into a Text Object I get the error: error in set modifier element function name: '}' expected.

I have been over the expression several times and all looks ok to me, can anyone help me?

I have been banging my head on this for a couple of days so any help would be greatly appreciated!

thanks

2 Replies
swuehl
MVP
MVP

Try

=Sum({$<BOOK_MONTH= {$(vMonthCurrent)} >}TOTAL_REVENUE).

hic
Former Employee
Former Employee

See also A Primer on Set Analysis and note the curly brackets that denote the entity set.

HIC