John Posted June 4 Share Posted June 4 Hi! is anyone know how to do cumulative sum of an average? or any alternative solution below? for above data, I want to have a cumulative average of a column so i can have the the total hours on the last step. Thanks! Link to comment Share on other sites More sharing options...
Solution Vincent Thuilot Posted June 4 Solution Share Posted June 4 (edited) Hi John, Yes there are a few options: The main one would be like this: Avg([Sales]) THEN SUM([Value]) OVER (AllPrevious([Axis.Rows])) it calculates the cumulative sum of the avg, here the results: when doing this you could also be interested in calculating the avg of all avg up to a certain row, and that would give this (Option 2): Avg([Sales]) THEN Avg([Value]) OVER (AllPrevious([Axis.Rows])) You can generate these fast by using the Cumulative SUM out-of-the-box option and tweak the code to replace the first SUM by AVG. Hope it helps! Edited June 4 by Vincent Thuilot 1 Link to comment Share on other sites More sharing options...
Gaia Paolini Posted June 4 Share Posted June 4 Are you looking at adding the averages, or calculating the global average? Link to comment Share on other sites More sharing options...
John Posted June 5 Author Share Posted June 5 Hi Gaia, I'm looking for adding the average. Thanks! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now