Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.


Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

How to make my last year stock amount display as 1,430,980 ?

Hi All

Below expression for monthly stock amount at Table 1 work fine. it can display stock amount by month from now till last yr.


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

-Sum(TOTAL Aggr(Sum({<year, SOURCE = {TDSS}, GL_CODE = {50010}, month>}[Amount]*1), YearMonth)))

, $(vMoneyFormatK_GL))

I also have a expreesion below from Table 2 , which display last year same period stock amount :-

RangeSum(Sum({<year, month, GL_CODE = {50010}>}[Amount]*-1),

Sum({<year, month, GL_CODE = {50010}, YearMonth = {"=YearMonth > AddYears(Max(TOTAL YearMonth), -1) and YearMonth <= Max(TOTAL YearMonth)"}>}[Amount]*-1))

it Display the amount 1,538,090.37 which is wrong.

May i know how to make it display as amount shown in Table April 1,430,984 ?


1 Reply
Not applicable

Re: How to make my last year stock amount display as 1,430,980 ?

my QVW doc