Calculating Average Crosstab Summary cells

Stimulsoft Reports.NET discussion
Post Reply
topsys
Posts: 8
Joined: Tue Sep 29, 2009 6:52 am

Calculating Average Crosstab Summary cells

Post by topsys »

Hi,
I have a crosstab report that has rows for customer names and 4 columns of info, col1 is a sum, col2, col3 & col4 are averages .
The report is displaying how many events there have been for each customer in each month and then the average number of days between key actions during these events.

The crosstab fields are all displaying OK, and the Col1 (sum) summaries (both row & column) are correct

The issue I am having is the average values summaries.
The cross tab cells are showing the average values of the data correctly, but the summary values are calculating the average of the averages

eg lets say there are 3 customer (rows) and there are a total of 10 events for these 3 customers.
Customer1 has 3 events and the number of days for each event is 3,2,4 giving an average of 3 (total days = 9)
Customer2 has 3 events and the number of days for each event is 5,5,5 giving an average of 5 (total days = 15)
Customer3 has 4 events and the number of days for each event is 1,1,1,1 giving an average of 1 (total days = 4)

................|.......January......| Febuary |
................|Events|Avg Days| |
customer 1|....3....|.....3.......| |
customer 2|....3....|.....5.......| |
customer 3|....4....|.....1.......| |
-------------|--------|-----------| |
....................10....|....3 (2.8)|

Stimulsoft report gives the summary value for the Avg days of 3 ((3+5+1) /3 = 3) ie average of the average values.
What I need to calculate is the overall average from the data
ie total days (= 28) / total events (10) = 2.8

Is it possible to overrider the generated average here & calculate these summary cells?

Maybe a control/setting I've missed or if I can make the calculations in the summary cells drectly?

I have only shown the example for the 1 bottom summary in i month, but the same applies to the right summary when you have a full year
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Calculating Average Crosstab Summary cells

Post by Alex K. »

Hello,

You can use the Process Cell events for the make calculations.
Please see the article on our knowledge base:
http://stimulsoft.helpserve.com/index.p ... icleid=350

Thank you.
cherou
Posts: 9
Joined: Wed Mar 22, 2017 10:03 am

Re: Calculating Average Crosstab Summary cells

Post by cherou »

i have a problem with calculation of average. i created a cross tab which contains empty cells in some columns. I want to calculate average for each column and i set Summary : Average and Summary Values: Skip Zeros and Nulls. This choice show 0 in every empty cell.
For example:
I want this:
----------| Col1 | Col2 |
Row1 50 | 50
----------|
Row2 50 | |
----------|
Row3 50 | 70 |
----------|
Average 50 | 60 |

But i see 0 in empty cell [Row2][Col2] ....
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Calculating Average Crosstab Summary cells

Post by Alex K. »

Hello,

Please send us a simple report with test data which reproduces the issue for analysis.

Thank you.
cherou
Posts: 9
Joined: Wed Mar 22, 2017 10:03 am

Re: Calculating Average Crosstab Summary cells

Post by cherou »

I can't send you a simple report because data are private. I think that crosstab has bug. I have 2 cases:
1) If i have 4 rows in each column. For a column i have value in three rows. I want to calculate average of this column. So I set Summary Values: SkipNulls and empty values not show,correctly. BUT the result of Average calculation is (div 4). I want (div 3).
2)If i set SkipZerosAndNulls, the result of average calculation is correctly (div 3) but in empty cell i see value 0 which is a mistake because i want null.
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Calculating Average Crosstab Summary cells

Post by Alex K. »

Hello,

We need some time to check the issue.

Thank you.
adchien
Posts: 1
Joined: Thu Sep 28, 2017 10:18 am

Re: Calculating Average Crosstab Summary cells

Post by adchien »

I faced the problem as toysys' post
The following link is failed
http://stimulsoft.helpserve.com/index.p ... icleid=350

Any idea to solve the problem?
Andrew
Posts: 4104
Joined: Fri Jun 09, 2006 3:58 am

Re: Calculating Average Crosstab Summary cells

Post by Andrew »

Hello,

Unfortunately, this service no longer work.
Could you please clarify what issue do you have?

Waiting for your reply.
Thank you.
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Calculating Average Crosstab Summary cells

Post by Alex K. »

Hello,

Could you explain your issue in more details?

Thank you.
Post Reply