# Required urgent help In Tibco Spotfire, I need to calculate Avg on the basis of Cumulative values by cumulative days of month, on which I am not getting appropriate results

In Tibco Spotfire 7.6, I need to calculate Avg on the basis of Cumulative values by cumulative days of month, on which I am not getting appropriate results, i.e.

I need this way

1 Oct - Value(100), 2nd Oct - Value (200)

Cumulative for 2nd Oct should be (300) and for obtaining Avg Value for 2nd Oct, it should divide 300/2 =150, but I am getting 300 only not AVG.

I have added one cross tab visualization, and on Axes (Cell Values) have created one Calculation for getting cumulative results (Month to Date) as below

a)

"UniqueCount([Column name]) THEN Sum([Value]) OVER (AllPrevious([Axis.Columns])) as [Cumulative Values] "   - For this I am getting cumulative values

Same way have created Cumulative days  as

b)

"(1) THEN Sum([Value]) OVER (AllPrevious([Axis.Columns])) as [Cumulative Days]" -  This too is giving me Cumulative days...

now I just need to divide Cumulative Value/Cumulative Days, i.e. a/b ,  for which I have written as:

UniqueCount([Column Name]) THEN Sum([Value]) OVER (AllPrevious([Axis.Columns])) / ((1) )THEN Sum([Value]) OVER (AllPrevious([Axis.Columns]))  as [Avg Cumulative]

its not giving proper results