Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
userid128223
Creator
Creator

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
Anil_Babu_Samineni

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

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
userid128223
Creator
Creator
Author

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.

Anil_Babu_Samineni

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

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
userid128223
Creator
Creator
Author

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.







Anil_Babu_Samineni

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.

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
userid128223
Creator
Creator
Author

show error in expression.

Anil_Babu_Samineni

Can you share image for that

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful