Hi,
I am presently using the following script to calculate the MAT :
CREATE MEMBER CURRENTCUBE.[Measures].[LatestMAT] AS
SUM([Time].[Time].currentmember.lag(13) : [Time].[Time].currentmember,[Measures].[Volume])
Could someone please tell me if there's any other more efficient way to do this?
MAT or moving annual total is calculated as the sum of volume of every time period from the present month to a year back. (in my case, i have 13 periods in a year. so that is 13 periods back)

**View Complete Post**

## Calculating GridView total using JavaScript/JQuery

Hello everyone.

One month ago I've had very nice conversation with a asp.net forum member asking about issue regarding calculation of GridView textboxes total using JavaScript. The main thing was to allow user to manually write values in the text boxes (placed inside GridView column) and if the value has changed automatically to perform calculation on client side.

At the end of the conversation, we came up to two solutions. The first solution was using plain JavaScript, but since I thought it was not so robust, and in order to make it more robust we would need to write few more functions. Therefore, I have simply proposed another solution using JQuery which came up much better, more robust with less code.

In this blog post I will show both of the solutions and will provide step by step explanation on how we did that.

Note: I'm using VWD.