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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

global variable?

Hello,

I have following Problem:

I need to calculate values for a selected Quarter and to compare them with earlier Quarters

e.g.

count (event)

count ( {$ <Quarter= {'$(#JQ_1)'} >}  event) with JQ_1 beeing a global variable defining the Quarter before the selected

Now, in my model I have one table with the columns ID sincedate todate, which i cannot directly contact with the Quarter selection.

count( {$ <Quarter=> }

if (

sincedate<='$(=max(Date))'   and   todate>='$(=min(Date))',

ID))

I thougt i should be possible to extend the formula  to 

count( {$ <Quarter=> }

if (

sincedate<='$(=max( {$ <Quarter= {'$(#JQ_1)'} >} Date))' 

and   todate>=''$(=max( {$ <Quarter= {'$(#JQ_1)'} >} Date))',

ID))

but it doesn't work. Is it possible, that the nested global variable is the reason for?

Thanks for your help,

Benno

Labels (1)
2 Replies
daveamz
Partner - Creator III
Partner - Creator III

Hello Benno,

Try to use above():

count(event) / above(count(event)

Regards,

David

Not applicable
Author

I have solved my Problem. the Syntax was right, but with a little error in detail ...

Thanks David for mentioning above() , seems to be interresting for my tasks.

Greetings ,

Benno