Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

IMPORTANT security patches for GeoAnalytics Server available to download: READ DETAILS
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

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.

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

give me the sample expression combination of those