Question

Is it possible to sum an average in a cube?

  • 25 March 2021
  • 4 replies
  • 50 views

Userlevel 2
Badge +10

In a cube I would like to have the average of columns (e.g. year, quarter, month), totalized in the rows (e.g. group, device). How could I achieve this? 


4 replies

Userlevel 6
Badge +17

Hi Andre,

It is a bit unclear to me what you are trying to achieve.

For example, do you mean that the 2020 Average should be used for the 2020 Sum? E.g. Average is here 4.01 over 2020 for let's say 50 rows, so the 2020 Sum should then be 200,50?

 

Userlevel 2
Badge +10

Hi Mark,

In the cube below the columns show the average in time. When I add a sum for the rows, I would like to show the sum of the average.  So for the first column I want a total of (8+48+88+12+850).

 

I also tried a cube field calculation with the DevExpress syntax, but I didn't find the right formula. 

Userlevel 6
Badge +17

Hi Andre,

It's not possible to create a Total for a Value column; only for Data columns. The way of achieving your goal is by calculating the average in the underlaying View (with a windowed function) for 1 row per Cap… (with Lijmen/Bankwerken etc.) and summing that column.

I hope that answers your question.

Userlevel 2
Badge +10

Hi Mark, 

It's not quite what I'm looking for, because the windowed function is based on a certain combination. If I use an average per week or period it will still totalize per year. 

Thanks for your response. 

 

 

Reply