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: 
bobpants
Partner - Contributor II
Partner - Contributor II

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
bobpants
Partner - Contributor II
Partner - Contributor II
Author

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))

View solution in original post

5 Replies
sunny_talwar

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)
Anonymous
Not applicable

The below can also work

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

 

bobpants
Partner - Contributor II
Partner - Contributor II
Author

Hi Both,

 

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

Thanks

 

sunny_talwar

Is 54,999,51 a single value or is this three different values 54, 999, & 51?
bobpants
Partner - Contributor II
Partner - Contributor II
Author

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))