Calculated Members in a Cross Tab

I have a Cross Tab report with Year as the Column Headers and Product Name as the Row Headers with Sales as the Summarized Field.  There are 5 Year values (e.g. 2004 to 2009 Inclusive) and I have created 5 new Calculated Member columns that do comparisons between consecutive years.  Everything works fine.
However, the report is parameter driven for the Year range and if I choose a new range (e.g. 2000 to 2004) different than my current range (e.g. 2004 to 2009) this causes all my Calcuated Member columns to disappear.
Is there a way to keep the 5 Calculated Member columns I created whenever I change the range of Years?
I do not want to resort to a Mock Cross Tab.
Any help would be appreciated.  Thanks in advance.

David,
If your parameter for the years were a starting year number, you could base all your calculations on it.
for example starting year=X
then data selected would be between Year(X) and Year(X)+4
And your column calcuations would be for years X, X1, X2, X3, X4
Debi

Similar Messages

  • Calculated column shows all zeros in cross tab discoverer report

    Hi
    I have a calculated column in a cross tab report which shows all zeros, but when i duplicate the report as 'table' the calculated colun is getting populated.
    i did not understand why it is doing like that, are there any special privileges or any special settings required for creating a cross tab report.

    Hi,
    No there is no special privs for cross tab but there is an aggregation issue.
    There are some methods of aggregations used in the discoverer.
    First thing you can so is to make sure that in the cross tab sheet you use the detailed data points and that you are not combining different levels of aggregations (for example one amount in details and another one summed).
    Second thing you can try is to change the aggregation for this worksheet, you can do that by going to the worksheet properties to the aggregation tab and try to change the settings.
    Third thing is to check the pref.txt file in the application server and set "AllowAggregationOverRepeatedValues" to 1
    BTW also search your data and find whether you got NULL values in the aggregated items, if so then wrap the data points with NVL function.

  • Cross Tab with Calculated Member Fails in BO Enterprise

    Hello,
    I have a report (Crystal Reports 2008)  that I created using a cross tab, with a calculated member field. This report runs fine on my desktop, but fails when published to Crystal Enterprise (Server 2008).
    When scheduled, the instance history states Crystal Reports: Print Engine Error
    When I remove the calculated member from the cross tab, it runs fine.
    Has anyone come across this and if so, how did you resolve it? I believe this is a brand new feature in Crystal Reports 2008 - is it not supposed within Enterprise?
    Thank you for your assistance.

    Root Cause: I had built my report in Crystal Reports 2008 on the latest Service Pack/Fix Packs (which addressed the issue of calculated member). My Crystal Reports SERVER 2008 was on a lower version.
    I opened a message with SAP support and they were unable to tell me how to apply service packs to my Server. They then pretty much abandoned my question, so below is what I came up with on my own to fix the issue.
    There are no specific service packs/ hot fixes for Crystal Reports SERVER 2008, so I had to:
    1) install Crystal Reports V0 on my CRS 2008 machine
    2)Install all Service Pack/Fix Packs available for Crystal Reports 2008 (even SP1, even though all SAP documentation tells you not to do this, it is required before you can install SP2)
    3) Reboot Server
    If you do the same thing as me, just a warning that installing the Crystal Reports SPs will break InfoView/CMC until you apply them all and re-boot.

  • Calculated members in cross tab

    Hi all,
    I have a profit and losses in a cross tab created by a group and I need to add some rows to have the totals.
    For example
    Revenue 1
    Revenue 2
    Revenue 3
    Total Revenue
    Cost 1
    Cost 2
    Total Costs
    For total revenue I used a calculated members with that formula:
    GridValueAt(GetRowPathIndexOf("Revenue 1"), CurrentColumnIndex, CurrentSummaryIndex)
    + GridValueAt(GetRowPathIndexOf("Revenue 2"), CurrentColumnIndex, CurrentSummaryIndex)
    + GridValueAt(GetRowPathIndexOf("Revenue 3"), CurrentColumnIndex, CurrentSummaryIndex)
    but the problem is that if I haven't for example any data for revenue 2 an error occurs -->argument # 1of "gridvalueat" is out of range.
    It's possible to check if the argument exist??
    thanks

    hi alessandro,
    i just found your forum post in the unanswered list...hopefully you've already found the answer for this.
    GetRowPathIndexOf is looking for the text in a specific cell and not the actuall Row or Column Name.
    When it doesn't find it, its output is -1...so you can use that in your formula to ensure that it doesn't break.
    for example, if you have a cross-tab that looks like
    Canada        1006
    USA             5555
    Mexico         2331
    GetRowPathIndexOf("Mexico") = 2 (as the index starts at 0 for Canada)
    GetRowPathIndexOf("Brazil") = -1
    hope this helps,
    jamie

  • Format Fields in Cross Tab and Calculated Members

    Hello:
    I have a cross Tab with a calculated member, I need to display one decimal or no decimal in some of the columns so I created a formula in the Display String option like this:
    if GridRowColumnValue ("@TestID_desc")= "ALK mg/L
    then
      Cstr(CurrentFieldValue, "0")
    else
      Cstr(CurrentFieldValue, "0.0")
    But, after I saved the formula the value in the calculated member colums disappears. Any ideas? Thank You in advance!

    right click on calculated field and go to format field and in number tab select customize button and write the condition for decimals.
    regards,
    Raghavendra

  • Cross Tab calculation in Individual column-Crystal Report

    Hi experts
    I am preparing a report in Crystal report 2008. Report template is Cross Tab.
    Structure of report is
    Cardname-Row, DocType-Columnd, DocTotal-Summarize field.
    Result of this report is
                          IN(Invoice)             RC(Incoming Payment)      Total
    XYZ                    1000                  -500                                 500
    ABC                    2000                 -1000                               1000
    Total                   3000                  -1500                               1500
    I have inserted a column using calculated member. I want to Calculate in that column with BP opening balance
    eg. OCRD.Balance-DocTotal when I do this it give first value to all column rows, i.e (consider XYZ opng Balance is 1500, I have calculate month opening balance which meance Current Opening Balance-Current month Order bookings=Month opening balance)
              IN(Invoice)             RC(Inc Pmt)      Total   Opng Balance
    XYZ       1000                  -500                  500     500
    ABC      2000                 -1000                1000     500
    Total      3000                  -1500                1500    500
    I want to calculate Opng Balance for each CardName but it gives first Customers opning balance to all customers.
    Give me solution.
    Thanks in Advance

    Hi
    I think you can do calculation based on the formula .On the cross tab ,there is :
    X -selection - row
    Y - selection -column
    Z - summary
    You can also use formula on cross tab to do that function  and insert into summary section .
    Hope this helps .
    Bishal

  • Calculations based on Summarized data in Cross Tab

    First off, I'm pretty experienced with Crystal.
    I've run accross something that seems like it should be realy easy to do, and the sort of thing you would expect to do  in a cross tab... so maybe I'm missing something totally obvious.
    I'm doing a year over year comparison of some financial data broken down by month and by quarter.
    So, my Rows are Quarter, and a field called 'YEARMONTH' (calculated field, YYYYMM, for ease of sorting)
    My column is Year, and for summarized fields, I have the data field I'm interested in which is a float. Let's call it 'Dollars' for sake of argument.
    What I want to do is create a summary field (next to the total field) called 'Difference' or 'Delta' that calculates for reach row the difference between my two years (2008, and 2009)
    The only solution I can come up with is to dummy in a record from the datasource with a year value of 'Difference' and some other dummy values so that it will show up as a column on the cross tab, and then somehow use the currentrowcolum function or some such creature to mask the output in the column. but now that I type it out here, I'm not sure it's going to work. I also don't think it's going to export the way I want it to either.
    I'd really prefer it to be in a cross tab, and not in some manually created cross-tab emulation using manual running totals, but I'll go there if I have to.
    Thanks a ton!

    This is what I did in my report to get the difference
    my crosstab looks like this
                        2004     2005    Total
    Total              T1         T2         T
    USA               A          B          C
    INDIA              X          Y          Z
    right click on T1 and go to format field and write the suppress condition like this
    numberVar d:=0;
    currencyVar array arr1;
    currencyVar array arr2;
    numberVar e;
    if GridRowColumnValue('year')=2004 then
    (e:=e+1;
    redim preserve arr1[e];
    arr1[e]:=CurrentFieldValue)
    else
    (e:=e+1;
    redim preserve arr2[e];
    arr2[e]:=CurrentFieldValue);
    false
    right click on T and go to format field and write the Display string condition like this
    currencyVar array arr1;
    currencyVar array arr2;
    totext(arr1[1]-arr2[1])
    right click on A and go to format field and write the suppress condition like this
    currencyVar array four;
    currencyVar array five;
    numberVar d;
    if GridRowColumnValue('year')=2004 then
    (d:=d+1;
    redim preserve four[d];
    four[d]:=CurrentFieldValue)
    else
    (d:=d+1;
    redim preserve five[d];
    five[d]:=CurrentFieldValue);
    false
    right click on C and go to format field and write the Display string condition like this
    currencyVar array four;
    currencyVar array five;
    numberVar g;
    g:=g+1;
    ToText(four[g]-five[g])
    Note: Please select the option "column totals on top" for crosstab in customize style
    Hope this helps!
    Raghavendra

  • CR 2011 - calculated member in cross tab

    Hello,
    I have created a cross tab in my report and added a calculated member. I have created a formula for all my rows because by default the value of the calculated member was "0". Now I wanted to add a new row to my report. The value in the calculated member now is not "0" but empty. How can I access the formula workshop now?
    Can anybody help?
    Thanks and regards,
    Jule

    if you right click on the cross-tab > go to Advanced Calculations > Calculated Member > click on the one that you want to edit and press the Edit Value Formula button
    cheers,
    jamie

  • Formatting Calculated values in Cross Tab

    I have a P & L Style cross tab where I have inserted calculated values to calcuate the key % values (Turnover, Overheads etc).
    I have used the "Quotient" calculations & bet the correct data, but I would like to format the values to show as %> When I try to change these values, all the values show as %.
    Is there any way to achieve what I need?
    Thanks

    Thanks for that, it would have been easier than the way I found, which was using the display string in the field formatting.
    I might have another pass at it now.
    Much appreciated

  • Inserting a calculated column after every column in cross tab, in crystal report 2011

    HI,
    I want to insert a calculated column after every column i a cross tab . The cross tab shows , sales by region for a number of years , for example from 2007 to 2013. The year can be changed based on the user parameter. How can I do that ?
    Thanks

    Hi Feroz,
    To calculate the Percentage Change and also to show the Percentage sign, here's what you need to do:
    1) Right-click the Calculated Column Header > Calculated Member > Edit ColumnValue Formula and use this code:
    cdate(1890,01,01)
    If the field used as the column is a datetime field, use this:
    cdatetime(1890,01,01,0,0,0)
    2) Right-click one of the zero values in the Percentage Column and select Calculated Member > Edit Calculation formula and use this code:
    if CurrentColumnIndex  = 2 then 
        If GridValueAt(CurrentRowIndex, CurrentColumnIndex-2, CurrentSummaryIndex) = 0 then 
        0 
        else 
         (GridValueAt(CurrentRowIndex, CurrentColumnIndex-1, CurrentSummaryIndex) - GridValueAt(CurrentRowIndex, CurrentColumnIndex-2, CurrentSummaryIndex))/ 
         GridValueAt(CurrentRowIndex, CurrentColumnIndex-2, CurrentSummaryIndex)
         ) * 100 
    else 
        If GridValueAt(CurrentRowIndex, CurrentColumnIndex-3, CurrentSummaryIndex) = 0 then 
        0 
        else 
         (GridValueAt(CurrentRowIndex, CurrentColumnIndex-1, CurrentSummaryIndex) - GridValueAt(CurrentRowIndex, CurrentColumnIndex-3, CurrentSummaryIndex))/ 
         GridValueAt(CurrentRowIndex, CurrentColumnIndex-3, CurrentSummaryIndex)
         ) * 100 
    3) Right-click one of the Values in the summary cells > Format Field > Number tab > Customize > Currency Symbol tab > Click the formula button beside 'Currency Symbol' and use this code:
    If Year(GridRowColumnValue("Date_field")) = 1890 then
    "%" else "$"
    Note: Replace Date_field with the field name you've used as the Column in the Crosstab. The double-quotes ARE required and you should remove any curly braces that CR adds automatically.
    4) You might want to use a similar code in the 'Position' formula too.
    Let me know how this goes.
    -Abhilash

  • SORTING FOR THE CALCULATION FIELD IN CROSS TAB REPORT

    LIST_G_AUCTION_TITLE>
    <G_AUCTION_TITLE>
    <BID_NUMBER>5002</BID_NUMBER>
    <AUCTION_TITLE>E2E-01 Construction RFQ</AUCTION_TITLE>
    <ITEM_NUMBER>C2631</ITEM_NUMBER>
    <ITEM_DESCRIPTION>4G000,000,0STRUC,X,SPECIAL STRUCTURE</ITEM_DESCRIPTION>
    <ESTIMATED_QTY>1</ESTIMATED_QTY>
    <UNIT>LS</UNIT>
    <QUOTE_PRICE>400</QUOTE_PRICE>
    <ESTIMATED_QUOTE_PRICE>400</ESTIMATED_QUOTE_PRICE>
    <SUPPLIER>X - L CONTRACTING</SUPPLIER>
    my xml data is in this format, i created a cross tab report for ITEM_DESCRIPTION as row and SUPPLIER as column and calculated a sum(ESTIMATED_QUOTE_PRICE)
    for all the ITEM_DESCRIPTION for every SUPPLIER in templete . now i need to sort the data by sum(ESTIMATED_QUOTE_PRICE) from lowest to higest from left to right , that is supplier with lowest sum(ESTIMATED_QUOTE_PRICE) should display first from left to right.
    can any one help thanks in advance.

    thank you tim , for asking i got the solution. it is actually in template builder i was asking about. xml template builder

  • Cross Tab Column Header and Embedded or Calculated Member

    Hello All
    I am needing some help with a Cross Tab in CR2008.
    My Cross Tab look as follows:
    Rows______________Columns
    ......................................Fiscal Year
    Account Number...........Summarized Field (Value Field)
    The report spans three Fiscal Years but not all accounts have three Fiscal Years worth of data so some Cross tabs start 2009, 2008, 2007, Some report 2008 and 2007, Some just 2007 (and other variations). To get my cross tab working correctly I need to create a formula that get the CurrentColumnIndex based upon the Fiscal Year. e.g. If columnd header = 2009 column index = 0.
    Can anyone advise how I would go about this?
    Thanks
    Phillip

    Phillip, go to your data source, and see if you can add a new connection,
    one of those options should be (Command)
    if you can add a Command, then you can put the SQL in the command section.
    You will need to add the Command as a data source, and remove the old
    data source once the command is added, you will be able to edit it if needed.

  • Calculating  values on cross-tab

    Post Author: Reisp
    CA Forum: Charts and Graphs
    Is it possible to calculate values in a cross-tab , for example , create a column3 = column1 + Column2 ?

    Hi,
    try to cerate a new calc :
    nvl(status_cnt,0)
    and create the totals on it,
    I think you got nulls in that column so it wont aggregate properly.

  • Calculating a Number in a Cross-Tab

    Not sure the best way to explain this one, but I was helped to create a cross-tab that used an array to calculate the number of incentives and summarize the result in a cross-tab.  Now I'm looking to take this number and multiple it by another column in a table {UnitCost} to calculate the total value of the incentives used for the report.
    The previous issue was here:
    Problems with running totals
    For instance, if the units costs are as follows:
    Double Fandango = 10
    Fandango = 5
    Gift Card $10 = 10
    Movie Ticket = 5
    I would like to cross tab to look like the attached picture.  Would this be possible?
    The array formula is:
    whileprintingrecords;
    stringvar d:= {OBI_EquipmentMaster.Description};
    numbervar p:= {DriveProjectionAndCollectedTotals.ProcedureProjection};
    numbervar pe:= {DriveProjectionAndCollectedTotals.ProceduresPerformed};
    stringvar array ad;
    numbervar array ap;
    numbervar array ape;
    numbervar c2:= 1;
    numbervar n:=0;
    // check to see if the description has been added to the string array
    // if not, add it plus add the initial projection value to the number arrays
    if not (d in ad) then
            numbervar c:= c + 1;
            redim preserve ad[c]; ad[c]:= d;
            redim preserve ap[c]; ap[c]:= p;
            redim preserve ape[c]; ape[c]:= pe;
    else
    // if the description is already in the array, find its position
    // then add the new projection as a running total to the appropriate number array values
        while c2 <= count(ad) do
                if d = ad[c2] then (n := c2; exit while);
                c2 := c2 + 1
        ap[n]:= ap[n] + p;
        ape[n]:= ape[n] + pe;
    // grand running totals
    numbervar gp:= gp + p;
    numbervar gpe:= gpe + pe;
    I thought it would be a start creating a new number variable:
    numbervar i:= {OBI_EquipmentMaster.UnitCost}
    But I'm not sure I understand the rest of the formula nor how to insert a new column in the cross-tab.  Any suggestions on how to proceed?
    Thanks,

    hi Trey,
    since you're using the Display String in your first summary you need to assign the displayed value to a variable. i.e. change the Display String formula to
    whileprintingrecords;
    stringvar t:= GridRowColumnValue ("rpt_EquipmentMaster.Description");
    stringvar array ad;
    numbervar array ap;
    numbervar c3:= 1;
    numbervar n2;
    while c3 <= count(ad) do
            if t = ad[c3] then (n2 := c3; exit while);
            c3 := c3 + 1
    numbervar apn:= ap[n2];
    totext(apn,0)
    once that is done, you now have a variable (apn) that is available on the row level for your summaries.
    once you've added the unit cost field as a Maximum type summary to your cross-tab as the second summary, right click on that summary and go to the display string for unit cost maximum. enter in this syntax:
    whileprintingrecords;
    numbervar apn;
    numbervar apnrt:= apnrt + apn*currentfieldvalue;
    totext(currentfieldvalue * apn,0)
    note that you're referencing the variable apn which is used in the output of the previous summary. also note that you're creating another running total named apnrt which runs in the background of the cross-tab. you'll need this running total for the grand total in the cross-tab.
    now right click on the grand total for the maximum unit cost summary and go to the display string for this value. enter in this syntax.
    whileprintingrecords;
    numbervar apnrt;
    totext(apnrt, 0)

  • Custom formula in cross-tab?

    I have a cross-tab like this
                      JAN    FEB    MAR ....... DEC (the 12 months as columns)
    year 2006
       item 01     150    205      300 .......    550
       item 02       80    190      284 ........   620
    year 2007
       item 01      458    235      224 .......... 781
       item 02      154    254      134..........  254  
    year 2008
       item 01       245    154      544           1243
       item 02       524    254      124 .........   924     
    I want to know if is possible to have a formula that take the value of each month and compare with the previous and make a calcule like this...
                      JAN    FEB    MAR ....... DEC (the 12 months as columns)
    year 2006
       item 01     150    205      300 .......    550
       item 02       80    190      284 ........   620
    year 2007
       item 01      458    235      224 .......... 781
                       (205)   (14)
       item 02      154    254      134..........  254  
    year 2008
       item 01       245    154      544           1243
       item 02       524    254      124 .........   924 
    where (205) and   (14) are calculate from:
    (205) = (150 - 458) * 100 / 150 I have to  make this operation for each month takin the values from item 01 from 2006 with the values from item 01 from 2007 and so on
    Edited by: j jara on Jul 22, 2008 2:01 AM

    Yes it is possible.
    It would be easier in CR2008  where you have the ability to add Calculated Members.
    In previous versions you would need to create a variable for each year and using the GridRowColumnValue function assign the current value to a variable. You would then need to add a second summary field as a "dummy" summary and in the Display string formula declare the variables and manipulate the values as you like and finally convert the output to string.

Maybe you are looking for

  • Error message for on Demand requests

    When I try the On Demand for movies or series I get a Error message "Unable to Tune to channel TPT2-2 at this time" and return me to what I was watching. I get this same message no matter what I select for on demand search. Whats up?  I'm new to the

  • Share dvd with windows vista

    hi, I have the new mac mini and would like to share the dvd with a windows vista pc, after all the installation and the configuraztion of both apple and pc on a local network, I can see the windows pc but it doesn't share the dvd! someone can help pl

  • Have sound but no picture....until I unplug it

    Since having the TV service hooked up about 3 weeks ago, I have had to reset my stb by unplugging it because at least a dozen times I have turned the TV on to find that I have sound but no video.  I have my TV up via HDMI for the video and my sound i

  • Authorization issue - Query is not working

    Hi All, I have creared an auth.object on zcomp_code. created a role and assigned to a particular user. I have included 20 comp.codes in this auth object. All is well except the query result I have 2 variables in the variable pop-up screen. 1 is FiscY

  • Windows to Mac conversion of an IPOD

    Can you convert a MS-Dos Ipod to Mac?