Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Live chat with experts, bring your API Integration questions. June 15th, 10 AM ET. REGISTER TODAY
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 II
Champion II

try like below sample.

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

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

Not applicable
Author

give me the sample expression combination of those