Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How To Calculate MAT

Hi

I have a data set in which I want to calculate MAT and I amusing this formula to calculate

Sum({<TYPE={'DATA'},XDate={'>=$(vDate) <$(vDate_1)'}>}[SALES])

Where vDate is a variable which has the value for current year date and vDate_1 has the same date of last year

but it is not showing correct value

BRs

21 Replies
sunny_talwar

Are you looking for cumulative chart?

Not applicable
Author

Yess cumulative chart containing sum of sales from last 12 months.

withyou calculation it only takes the sum of current month I dont know why , may be the range we are defining in that formula is correct

sunny_talwar

For cumulative chart, we will need a RangeSum function together with Above/Below function. Let me work on a solution for you.

Best,

Sunny

Not applicable
Author

Ok

Thanks Sunny

sunny_talwar

Actually you might not need it, if this is what you are looking for:

Capture.PNG

I used the inbuilt accumulation functionality of QlikView:

Capture.PNG

See if this works (attaching the qvw as well)

Best,

Sunny

Not applicable
Author

No its not working


sunny_talwar

Hi Sujit,

When you say not working, do you mean its not giving you the desired results? I am not sure what exactly are you trying to get? Will you be able to provide with your expected result?

Best,

Sunny

Not applicable
Author

Hi sunny,

I mean I am not getting desired results. What I am expecting is :-

Lets say we have a line chart where I have Date on X axis . Now at each point for ex jun-2014 it should show the sum of the sales till July-2013 to Jun-2014. This is what Moving annual total is at all points. here we need to sum tha sales for a range of 12 months including selected month and back 11 months. Please let me know if any other info you need.

Thanks

sujit

sunny_talwar

I think I understand what you are looking for. Let me see if I can get a sample soon.

Best,

Sunny

sunny_talwar

May be this?

Capture.PNG