6 Replies Latest reply: May 11, 2016 10:40 PM by Yeo Poh sai

# How to insert my field = sTOCK into my expression ?

Hi All

I hv below expression working fine , need to click on button to filter GL_CODE=50010

=

(RangeSum(

Above(RangeSum(Above(Sum({<year, month>}[Amount]*-1), 0, RowNo()))),

-Sum(TOTAL Aggr(Sum({<year, month>}[Amount]*-1), YearMonth)))

)

I have add the field for sTOCK , which will filter GL_CODE=50010:-

If([Reporting Code]>=50010 and [Reporting Code]<=50010,'sTOCK') as [sTOCK],

My i know how to insert the filed sTOCK into above expression ?

Table 1 16 April should get -111,135 Amount.

Paul

• ###### Re: How to insert my field = sTOCK into my expression ?

My QV Doc

• ###### Re: How to insert my field = sTOCK into my expression ?

May be this:

=

(RangeSum(

Above(RangeSum(Above(Sum({<year, month, sTOCK = {'sTOCK'}>}[Amount]*-1), 0, RowNo()))),

-Sum(TOTAL {<sTOCK = {'sTOCK'}>} Aggr(Sum({<year, month, sTOCK = {'sTOCK'}>}[Amount]*-1), YearMonth)))

)

• ###### Re: How to insert my field = sTOCK into my expression ?

Hi Sunny

Hi Sunny

Many Thank , Your expression work fine.

But why when i with out filter GL_CODE = 50010 Table 2 not  work  ?

Yet Table 1 working fine with same expression ?

Also  I aware that above(Rangesum does not support V9 of QV ) But now okay .

Paul

• ###### Re: How to insert my field = sTOCK into my expression ?

Did not notice that there were two tables. I will look at it in a little bit.

• ###### Re: How to insert my field = sTOCK into my expression ?

Is this you are looking for?

• ###### Re: How to insert my field = sTOCK into my expression ?

Hi Sunny

Table 1 is before you add filter on sTOCK.on 2nd expression.

Table 2 is after you add filter on sTOCK on 2nd column expression.

And now Column 1 and 2 expression working fine on Table 2.

My question is , SET expression should be not affected other expression in same table ? why this case it happen ?

Can you share with me ?

Paul