Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
LINKEDIN LIVE: Democratizing data to enhance customer-centricity. JULY 29TH REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
jorditorras
Creator
Creator

How to SUM data of last 12 months

Hi Qlik Gurus,

I have a Qlikview App which one of its Expressions is being calculated by a variable:

$(vG.Measure.ST.Accum.Rotation.Value.Consumption)

This variable is showing the Consumption of stock of the selected period.

Is it possible to calculate Consumption of last 12 months (of maximum selected date) using this variable by adding any Qlikview function in the expression?

Thanks in advance.

Regards,

Jordi

1 Reply
Anil_Babu_Samineni

We can use this?

Sum({<$(vG.Measure.ST.Accum.Rotation.Value.Consumption), MonthField = {">=$(AddMonths(=Max(MonthField),-3)) <=$(=Max(MonthField))"}>}Sales)

Or

Sum({<MonthField = {">=$(AddMonths(=Max(MonthField),-3)) <=$(=Max(MonthField))"}>} $(vG.Measure.ST.Accum.Rotation.Value.Consumption))

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)