Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Discover the Trends Shaping AI in 2026: Register Here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Last 3 months calculation

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 Solution

Accepted Solutions
sunny_talwar

Check now

Capture.PNG.

Expression:

=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=>}$(Vunit)), 0, 3))

View solution in original post

11 Replies
sunny_talwar

Not sure I understand what is not getting captured for Mar-2016?

Anonymous
Not applicable
Author

check the Apr-2015 AMS value , it is not calculating last 3 months value

sunny_talwar

For Apt-2015 it is doing this:

(1,030,188)/((1,026,422+522,534+503,819)/3) = 1.5055 or 1.51. What is the issue?

Capture.PNG

Anonymous
Not applicable
Author

if you click on MAR-2016 then APR-2015 value is changing, it is supposed to be not change right??

Anonymous
Not applicable
Author

1.PNG

sunny_talwar

Check now

Capture.PNG.

Expression:

=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=>}$(Vunit)), 0, 3))

Anonymous
Not applicable
Author

Hi ,

when am using month_year as dimension in the basic view backward stock coverage volume showing correct but  when am using the month name as a dimension in the above chart of basic view  Backward stock coverage volume showing different value,

can you please help me out on this

Regards,

Devendar

Anonymous
Not applicable
Author

Last 3 months calaculation

you can see the application here

sunny_talwar

Do you have the numbers you would want to see?