Crystal Crosstab需要帮助添加列以突出平均和差异 [英] Crystal Crosstab need help adding columns to highlight average and difference

查看:199
本文介绍了Crystal Crosstab需要帮助添加列以突出平均和差异的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个交叉表,显示本月和上个月的客户ID的callid的计数,这显示前10组。我的问题是,我需要一个列,显示本月和上个月之间的差异,然后我需要一个12个月平均



的列。我的交叉表目前看起来像这样

  Sept Aug 
Customer1 80 20
Customer2 56 58
Customer3 60 88
Customer4 71 54
Customer5 98 45

看起来像这样

  9月份差异12mthAvg 
Customer1 80 20 60 65
Customer2 56 58 -2 73
Customer3 60 88 -28 52
Customer4 71 54 17 48
Customer5 98 45 53 56

这可能吗?



感谢,



Annette

解决方案

月平均很容易。右键点击总计列中的第一行(默认情况下,这是最左边的列),选择编辑摘要...,然后从计算此摘要组合框中选择平均值。这假设交叉表总是包括12个月的数据,这可以通过设置适当的记录选择公式来容易地完成。



我会做一些研究



如果您拥有Crystal Reports 2008,您可以添加计算列。



以下是步骤:


  1. 选择第二列的标题,然后选择计算成员|插入列。

  2. 右键单击新列中的第一个单元格,然后选择计算成员|修改计算公式

  3. 在公式文本中输入以下内容:



    //查找当前值
    当前(计算)列
    左侧的两列中的行
    GridValueAt(CurrentRowIndex,CurrentColumnIndex-1,CurrentSummaryIndex)+
    GridValueAt(CurrentrowIndex,CurrentColumnIndex-2,CurrentSummaryIndex)


  4. 通过右键单击标题并选择计算的成员|编辑标题公式。


  5. 对每个计算列重复步骤1-4。在第3步中,将偏移量从-2更改为-3,以计算是否存在计算的列。



I have a crosstab which shows a count of a callid for this month and previous month by customer id this is showing a top 10 group. My problem is I need to have a column that shows the difference between this month and previous month and then I need a column for the 12 month average

i.e. My crosstab currently looks like this

                             Sept        Aug
Customer1                     80         20
Customer2                     56         58
Customer3                     60         88
Customer4                     71         54
Customer5                     98         45

I need it to look like this

                            Sept        Aug       Difference     12mthAvg
Customer1                     80         20        60              65
Customer2                     56         58        -2              73
Customer3                     60         88       -28              52
Customer4                     71         54        17              48
Customer5                     98         45        53              56

Is this possible?

Thanks,

Annette

解决方案

The monthly average is easy. Right click the first row in the 'Total' column (by default, this is the left-most column), select 'Edit Summary...', and choose 'Average' from the 'Calculate this summary' combo-box. This assumes that the cross-tab always includes 12 months of data, which can be easily done by setting an appropriate record-selection formula.

I'll do some research on the monthly deltas and post my results.

** edit **

If you have Crystal Reports 2008, you can add a calculated column. You will need to have 11 of these.

Here are the steps:

  1. Select the second column's header and choose Calculated Member | Insert Column.
  2. Right click the first cell in the new column and select Calculated Member | Edit Calculation Formula
  3. Enter the following in the formula's text:

    //find the difference in values of the current row in the two columns to the left of the //current (calculated) column GridValueAt(CurrentRowIndex,CurrentColumnIndex-1,CurrentSummaryIndex) + GridValueAt(CurrentrowIndex,CurrentColumnIndex-2,CurrentSummaryIndex)

  4. Change the column header's text by right clicking the header and choosing Calculated Member | Edit Header Formula'.

  5. Repeat steps 1-4 for each calculated column. In step 3, change the offset from -2 to -3 to account for the presence of the calculated column.

这篇关于Crystal Crosstab需要帮助添加列以突出平均和差异的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆