Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Last 3 months stock

Hi All,

In the  below Qvw there is AMS (Average monthly Stock ) --

Distributor stock Value/ last 3 months of Indirect sales Value

Example : if we are in Jun-2015 the value should be 273,589/1,026422+468,380+503,819/3

the above condition is satisfied but when we are selecting Mar-2016 year and month filter ,

the APR-2015, MAY-2015 is not capturing last 3 months data  (it is calculating only previous month data)

can we do capture back end data in the table?

can any help on this??

Regards,

Devendar

1 Reply
sunny_talwar

May be this:

=Sum({$<Month=, Year=,[Indirect Sales Type ID]={'Stock'} ,Stock_Status={'Available'}, CALEN_DT={">=$(=MonthStart(AddMonths(Max(CALEN_DT),-11)))<$(=MonthEnd(Max(CALEN_DT)))"}>} $(Vunit))/

RangeAvg(Before(Sum({$<Month=, Year=,[Indirect Sales Type ID]={'GRSLS@GSK','GOODRET@GSK'},

CALEN_DT={">=$(=MonthStart(AddMonths(Max(CALEN_DT),-11)))<$(=MonthEnd(Max(CALEN_DT)))"}>}$(Vunit)), 0, 3))