Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
amiumi66
New Contributor III

expression in set analysis within pivot error

i am trying to restrict a column within pivot table via set analysis.

for example:

Expression1=num(score -2)

New Field based on setanalysis:

sum({<num(score)-2 =  {">20"}>} score)     // this is failing. It cannot evalue my Expression 1 formula within set analysis.

7 Replies

Re: expression in set analysis within pivot error

First of all, Your first expression seems wrong. Can you tell us your business requirement

Life is so rich, and we need to respect to the life !!!
amiumi66
New Contributor III

Re: expression in set analysis within pivot error

Business requiement is complex. hence i am trying to simplify trying to ask this question.

I have tried just create a random # for example:

Expression1=num('45'-5)

sum({<num('45'-5) =  {">20"}>} score)   // this fails. Expression should evaluate to #40.

Re: expression in set analysis within pivot error

Even, Complex also we can help you. The reason i am asking you is Num('45'-5) returns 40 for all dimensions as static

If you assign label like Expression1 for first expression. And you are doing with 2nd one that should be this

sum({<Expression1 =  {'>20'}>} score)


But, my doubt is what does the use of here. You can go with that if you still want

Life is so rich, and we need to respect to the life !!!
amiumi66
New Contributor III

Re: expression in set analysis within pivot error

sum({<Expression1 =  {'>20'}>} score)


I tried above which is what i thought should work but apparently it fails. there is red syntax error on 2nd curly brackets.


idea is to evalute expression1 results into set analysis and do >= on that value.







Re: expression in set analysis within pivot error

Don't worry about red signal. Think whether how error message shows to you. Does it showing Expression Ok or it shows any error. If it is showing any error there must be problem. The case, may be share image for expression. If it is showing Expression is OK Syntax is right but Qlikview just consider as there agenda nothing new. It will work as you expect when expression seems ok.

Life is so rich, and we need to respect to the life !!!
amiumi66
New Contributor III

Re: expression in set analysis within pivot error

show error in expression.

Re: expression in set analysis within pivot error

Can you share image for that

Life is so rich, and we need to respect to the life !!!
Community Browser