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: 
Not applicable

variable issue

hi friends,

i have small issue with variable in my pivot table am using one variable like"VRev", of following expression

=sum({<Test2,Level3_desc,Desc2, vc_gl_code_L1={'4'} ,YEAR={$(VMaxYear)}>} DEBITAMT-CRDTAMNT)*Flag_Sales,

the above expression is giving the right values in pivot table but in the sub level the values are not displaying. and if i am not using '='

sign before expression it displays right values of sublevel but the main values are not correct, let me know is there any issue with my expression.

3 Replies
tresesco
MVP
MVP

The issue is not with variable I guess. If you use set analysis in a chart, it gets evaluated once for the chart and NOT row-wise. You might have to use Sum(If(... or Firstsortedvalue() in combination with aggr() to achieve the same. Try to share a sample qvw for detailed help.

vinieme12
Champion III
Champion III

try like below sample.

Sum( AGGR( YourExpression , Field1,Field2,....) )

here field1,field2 are the dimensions used in the pivot table.

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
Not applicable
Author

give me the sample expression combination of those