Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
Partner
Partner

Variables in set analysis syntax (again!)

Hi,

 

I am using set analysis with a variable but cannot get the syntax to work - being trying on and off for days !

 

The variable TUE_P_PGR has the value (54,999,51).

 

This works fine...

if(
(only( {<PGR={54,999,51}>} PGR ))>0 ,

sum({<BRANCH={86,96}>} REQ)

 

but this doesn't below and I cant find any combo of '$({" that seems to produce the same result..

 

if(
(only( {<PGR={$(=(TUE_P_PGR))}>} PGR ))>0 ,

sum({<BRANCH={86,96}>} REQ)

 

Any ideas appreciated please 🙂 !!

1 Solution

Accepted Solutions
Partner
Partner

Re: Variables in set analysis syntax (again!)

Aha - this finally worked below - thank you for your help though it gave me some ideas !

 

If(Only({$<PGR = {$(=TUE_P_PGR)} >} PGR) > 0,
Sum({<BRANCH = {86,96}>} REQ))

5 Replies

Re: Variables in set analysis syntax (again!)

Try this

If(Only({<PGR = {"$(=TUE_P_PGR)"}>} PGR) > 0,
Sum({<BRANCH = {86,96}>} REQ)

or

If(Only({<PGR = {"$(=$(TUE_P_PGR))"}>} PGR) > 0,
Sum({<BRANCH = {86,96}>} REQ)
SmartSpace83
New Contributor

Re: Variables in set analysis syntax (again!)

The below can also work

If(Only({$<PGR = {'$(TUE_P_PGR)'} >} PGR) > 0, Sum({<BRANCH = {86,96}>} REQ)

 

Partner
Partner

Re: Variables in set analysis syntax (again!)

Hi Both,

 

Thanks for your input but neither worked I am afraid. Any other thoughts please ?

Thanks

 

Re: Variables in set analysis syntax (again!)

Is 54,999,51 a single value or is this three different values 54, 999, & 51?
Partner
Partner

Re: Variables in set analysis syntax (again!)

Aha - this finally worked below - thank you for your help though it gave me some ideas !

 

If(Only({$<PGR = {$(=TUE_P_PGR)} >} PGR) > 0,
Sum({<BRANCH = {86,96}>} REQ))