Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
hemanthaanichet
Creator III
Creator III

How to calculate MAT when year as a dimension

Hi Guys,

I need to calculate MAT for the available data

Moving Average Turnover (MAT):

Dimensions: Year


Expression : (Current Year - Previous Year) / Previous Year

Current Year : latest 12 months i.e.,(Aug-15 to Jul-16)

Previous Year : previous latest 12 months i.e.,(Aug-14 to Jul-15)

Expression output value sholud be plotted in latest year i.e., 2016

Need to show all the Year

Example 1:

Dimension      Expression

2016           (Current Year (Aug-15 to Jul-16) - Previous Year (Aug-14 to Jul-15)) / Previous Year (Aug-14 to Jul-15))

2015           (Current Year (Aug-14 to Jul-15) - Previous Year (Aug-13 to Jul-14)) / Previous Year (Aug-13 to Jul-14))

sooo on for the remaining years

Month interval has to vary based on the selection

Exanple 2:

Selection: Year= 2016 Month= Apr

Dimension      Expression

2016           (Current Year (May-15 to Apr-16) - Previous Year (May-14 to Apr-15)) / Previous Year (May-14 to Apr-15))

2015           (Current Year (May-14 to Apr-15) - Previous Year (May-13 to Apr-14)) / Previous Year (May-13 to Apr-14))

sooo on for the remaining years

Selection: Year= 2015

Dimension      Expression

2015           (Current Year (Jan-15 to Dec-15) - Previous Year (Jan-14 to Dec-14)) / Previous Year (Jan-14 to Dec-14))

2014           (Current Year (Jan-14 to Dec-14) - Previous Year (Jan-13 to Dec-13)) / Previous Year (Jan-13 to Dec-13))

sooo on for the remaining years


Attached the same data

24 Replies
sunny_talwar

Not a problem brother. What exactly related to QMC are you looking for?

hemanthaanichet
Creator III
Creator III
Author

actually i didnt know abt QMC as it handle by others

i want to learn it from the basic

hemanthaanichet
Creator III
Creator III
Author

Thank you sunny

I will go through it once

If I had any doubts I will ask u...

danieladv
Partner - Contributor II
Partner - Contributor II

Hi Sunny!

I have encountered the same problem and found this thread.
Hope it lives :)

My problem is that I only see the sum for max date.
Have tried to change a little without results.

Thought to see if you can help me.
I want to be able to see MAT calculation for 3 years back and with year month as dimension.
I must also have a selected Product to get a value:(MAT.PNG

 



My Measure: FirstSortedValue({}MonthKey))}>}Aggr(RangeSum(Above(Sum(Units), 0, 12)), [Date.autoCalendar.YearMonth]), -[Date.autoCalendar.YearMonth])

Hope there is a solution:)