Formula/manual cross tab help

my variable name in my database is rsq01. the results for this variable are 0,1,2,3,4,5.
I need to setup a crosstab that only shows the results 1-5 and what percent of the total results they are, 0 needs to be excluded
from the crosstab and from the count that is used in figuring the percentage because 0 is actually null.
I have been told to do this I will have to make a manual cross tab using formulas.
Any suggestions/examples on how to do this? Thanks.

Pretty simple actually. Just create 5 formulas...
//Formula 1
Global NumberVar rsq01;
IF rsq01= 1 THEN {TableName.FieldName} ELSE 0
//Formula 2
Global NumberVar rsq01;
IF rsq01 = 2 THEN {TableName.FieldName} ELSE 0
//Formula 3
Global NumberVar rsq01;
IF rsq01= 3 THEN {TableName.FieldName} ELSE 0
//Formula 4
Global NumberVar rsq01;
IF rsq01= 4 THEN {TableName.FieldName} ELSE 0
//Formula 5
Global NumberVar rsq01;
IF rsq01= 5 THEN {TableName.FieldName} ELSE 0
Then group by the appropriate field, sum each of the formulas and hide the details.
HTH,
Jason

Similar Messages

  • SAP Crystal Report - Formula in Cross Tab Report

    I have a below requirement in a cross tab report,
    Category          Name          Valu1          Value2    %ge
    A                       Car               40                  50        80
    A                        Bike             30                  60        50
    Total                                       70               110     63.6
    %ge is a formula field and is calculated as value1/value2 * 100
    Consider the Total section as a group footer.
    In the cross tab report how do I put the formula field for %ge in Total section.

    Vishujain
    Crosstabs are very structured and you are limited in what you can do with them. You can do a percentage summary in Crosstabs, but only as a percentage of the row total or the percentage of the column total. You cannot put a formula in the crosstab to do a percentage of a values in seperate rows. Any time I need to perform a function not available in a crosstab, I do a manual cross tab. Look at: [Manual Crosstab Explaination|Re: Formulas : Help for coding]
    Debi
    Edited by: Debi Herbert on Nov 3, 2011 11:51 AM

  • Drill down of manual cross tab reports with Multi variable subreports

    I tried to make a subreport by setting the hyperlink on the group sum of a manual crosstab (http://www.tek-tips.com/faqs.cfm?fid=1219) by setting Hyperlink to another report object.
    The documentation said I should copy and paste the name of the report object in the sub report over into the field in the primary report.  As I don' t really know what a report object is this failed.  Further I found some code in a sample report to deal with subreports that have multiple parameters.  The code was unbelievable; it couldn't be right.  So, how do I link my subreports to my reports by passing two parameters to the subreports that represent the row and column label of a given sum.
    Further what are the fields in the hyperlink another report object from for:
    Select from: //do they want a query here?
    Report title: //The don't let you type in this
    Object Name: //This seems elective
    Data Context:// No clue on this either
    Thanks for any help you can provide
    p.s. This forum doesn't seem to use traditional bit code

    Thanks for the reply.  I looked through those samples and other samples.  The two cross tab samples I could find were CtossTab and Inventory CrossTab.  Neither has a hyperlink to a sub report and I believe those were actual cross tabs, not manual crosstabs.  When I scoured the web for an answer, all I could find was what was linked.  This is going 20 pages deep on google.
    Crystal crosstabs are 98% better than the excel power pivot or pivot table.  However, with Excel, you can drill down to the details automatically.  With crosstabs you can't.  I was hoping to replicate this by making each summary in the manual cross tab a hyperlink to a sub report that filters the details based on the row and column just as excel does.  There is no sample for this.
    Oh yes, I'm using CR XI

  • Running Totals and Formulas with Cross Tabs

    Hi,
    I'm using Crystal Reports 2008 and am having two issues using Cross Tabs.
    The first is that I want to have two crosstabs. They both will have a common Y axis (Oppourtunity.Sales Rep), and on the Y Axis I want one to show all (Opportunity.Create Date) where (Opportunity.Staus = Won) and the other where (Opportunity.Staus = In Process), but I can't figure out how to contruct the formula to return this result.
    The other issue, is that in addition to summarizing based on Sum (Opportunity.Expected Revenue), I would also like to create a running total to show the cumulative (Expected Revenue) Week over Week.
    Any direction would be fantastic.
    Thank you,
    Michael

    Please go through the SAP Notes listed here which would help you how to create mannual running totals in crosstab
    [https://www.sdn.sap.com/irj/scn/advancedsearch?cat=sdn_ossnotes&query=runningtotalin+crosstab&adv=true&note_number=&component=&sdn_updated_on_comparator=GE&sdn_updated_on=&sortby=cm_rnd_rankvalue]
    Regards,
    Raghavendra

  • Diffrent Data Type & Formula in Cross Tab

    Post Author: ade
    CA Forum: General
    I using crystal reports 8.5. I make cross tab like this to viewing reportsSubject           Evaluation Aspect                          Score1        Score2            Score3        Score4        Score5 Math               Conceptual Understanding                     80                    75                     70                 80                   A                          Problem Solving                                          77                    80                            90                67                    BEnglish                Reading                                                        89                    80                             86                80                    A                                Wring                                                        80                        80                              70                85                  Bfrom the table above, there are 2 types of different data they are numeric and string.In the using of logical "if" in cross tab is not allowed to use different data type and I don't understand on it... would you please help me, what shoul I do then? 

    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.

  • 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.

  • Formula for Cross-Tab Column

    Hi
    I am struggling with a particular issue related to cross-tab and I tried a lot, but couldn't managed to get the solution.
    Please help with this issue , it would be of great help to me.
    Thanks
    Aniket
    [CrossTab problem|http://www.forumtopics.com/busobj/viewtopic.php?t=120765]

    Thanks for your prompt reply.
    As I am new to this forum,so I don't know how to attach file, also I tried searching but couldn't get.
    At the end of the previous post, Link is given. There is a file attached "Plz_help.zip". Please look into that file and also if you know how to attach any file, please let me know.
    If still it's not clear, please let me know I will try my best to clear this issue.
    [http://www.forumtopics.com/busobj/viewtopic.php?t=120765]
    Thanks a lot.
    Regards
    Aniket

  • Formula for cross tab row

    Post Author: bvandyck
    CA Forum: Formula
    The results of a row in a cross tab report need to be split out by percentages and added to the results of other rows.  Each row is an individual, except one row is a combination of individuals.  Certain individuals share in the results of the combination row.   The combination row will be zero after being added to the individuals' rows.  What is the formula for achieving this?

    Hi,
    U may create a new formula for that.
    There is an option in cross tab expert for new formula.
    U may create a formula of your choice and then insert in report.
    Regards,
    Misra P.

  • 'print time' formula in cross tab?

    Is it possible to use a formula that is processed 'whileprintingrecords' in a cross table?

    Hi Marlene
    We cannot use the formula using Print time functions in Crosstab as these functions is processed in Pass # 2 of multi-pass reporting and the Crosstab is processed in Pass #1.
    You can refer Multi-Pass Reporting Topic of Crystal Reports Help for more clarification.
    To work around this issue you can use subreport and create a formula using print time functions and with the help of shared variable display it in Main report crosstab.
    Hope this helps!
    Thanks

  • Crystal Reports 2008 Formula in Cross-Tab Error Not Supported

    I have a crosstab that was created in Crystal XI and when I opened the report in Crystal 2008 I receive an Error "Not Supported" when I removed the fromula that was in the Crosstab the report displayed. The following is the formula that is within the crosstab:
    If {VWR_PPS_VISIT_SCHEDULE.COHORT_NAME} = '(No Cohort)'  THEN
        If DistinctCount({VWR_PPS_VISIT_SCHEDULE.COHORT_NAME},{VWR_PPS_VISIT_SCHEDULE.PROPOSAL_VERSION_ID}) >1 then
             {VWR_PPS_VISIT_SCHEDULE.COHORT_NAME}&" "&{VWR_PPS_VISIT_SCHEDULE.VISIT_NAME}
        else
            ""&" "&{VWR_PPS_VISIT_SCHEDULE.VISIT_NAME}
    else
        {VWR_PPS_VISIT_SCHEDULE.COHORT_NAME}&" "&{VWR_PPS_VISIT_SCHEDULE.VISIT_NAME}
    As I mentioned the formula works perfectly in Crystal XI but not Crystal 2008 which no sese at all.  We are preparing to migrate from Crystal XI to Crystal 2008 and if this is an issue we may need to but upgrading off.
    Any help with this would be gratly appreciated.
    Thanks
    Edited by: jackie2009 on Oct 9, 2009 3:41 PM

    Try adding brackets around the If statements.e.g.
    If {VWR_PPS_VISIT_SCHEDULE.COHORT_NAME} = '(No Cohort)' THEN
    If DistinctCount({VWR_PPS_VISIT_SCHEDULE.COHORT_NAME},{VWR_PPS_VISIT_SCHEDULE.PROPOSAL_VERSION_ID}) >1
    then {VWR_PPS_VISIT_SCHEDULE.COHORT_NAME}&" "&{VWR_PPS_VISIT_SCHEDULE.VISIT_NAME}
    else ""&" "&{VWR_PPS_VISIT_SCHEDULE.VISIT_NAME}
    else {VWR_PPS_VISIT_SCHEDULE.COHORT_NAME}&" "&{VWR_PPS_VISIT_SCHEDULE.VISIT_NAME}

  • Creating a Cross tab that contains fields with shared variables

    I am trying to create a cross tab in CR2008. I can get the field in the details but cannot choose it when trying to create a cross tab. Please help.
    Thanks.
    Shared numbervar MonHrs;
    Shared numbervar TueHrs;
    Shared numbervar WedHrs;
    Shared numbervar ThuHrs;
    Shared numbervar FriHrs;
    Shared numbervar SatHrs;
    Shared numbervar SunHrs;
    If dayofweek(today) = 1
        then {@CapacityTeamCount} * SunHrs else
    if dayofweek(today) = 2
        then {@CapacityTeamCount} * MonHrs  else
    if dayofweek(today) = 3
        then {@CapacityTeamCount} * TueHrs else
    if dayofweek(today) = 4 
        then {@CapacityTeamCount} * WedHrs else
    if dayofweek(today) = 5
        then {@CapacityTeamCount} * ThuHrs else
    If dayofweek(today) = 6
        then {@CapacityTeamCount} * FriHrs else
    if dayofweek(today) = 7
        then {@CapacityTeamCount} * SatHrs

    I don't use CR cross tabs as a matter of preference so I can't tell you if the shared variables are having an impact on their availability in the cross tab dialog or how to make the necessary adjustments...
    I can, however, tell you that you don't need a cross tab for what you are trying to do. All you need to do is split all of the IF formulas in to their own formulas.
    This will place each day in it's own column.
    Now... you'll notice that there's a lot white space and nothing's aggregated... Not to worry, it's easy to fix.
    Just create a grouping on which ever field you were going to use as "rows" in the cross tab... insert SUM totals in the group header... and hide the details.
    Now you have created your own manual cross tab, without using CR's cross tab object.
    HTH,
    Jason

  • 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

  • Totals in a cross tab report

    I'm working with Crystal Reports XI.  We have an existing report that was created using the Cross-tab report type.
    There are 3 summary fields in the report:
    - direct cost
    - indirect cost
    - Total ( direct cost + indirect cost)
    Everything worked fine until now because both the direct cost and the indirect cost were being rounded to 2 decimal places.  However, I have a new requirement to round the indirect cost total to a whole dollar ( no decimal places) before adding it to the direct cost total.  This creates a problem for the third summary field because I'm only able to do:
    - create a formula field of (direct cost + indirect cost rounded to a whole dollar)
    - use that amount in the summary field
    The problem is that then the indirect cost is being rounded for EACH record separately.  But what I need to to calculate the Total indirect cost first and only after I have that total rounded to a whole dollar, add it to the direct cost total.
    So basically, I would like for the third row to simply show the sum of the first row and the second row.
    I can't take the current total ( direct cost + indirect cost) and then round this total because the rounding for the total direct cost needs to be done in a different way than the rounding for the indirect cost total.
    Is that possible with the cross-tab report type?  Is it possible to have 2 running totals in a cross tab report and then have a custom field in the report that rounds each using the appropriate rounding algorithm and then adds the two up.
    thanks

    Thank you for your suggestions.  I kind of suspected that I wouldn't be able to use the current cross tab report to achieve this but since I've never worked with a cross tab report before I wanted to make sure this is the case before investing the time to do it some other way.
    I will try using the manual cross tab report as you suggested.
    Thanks again.

  • Cross-Tab - conditional suppression and formatting

    I have a cross-tab report of "widgets" sold. There are $10 widgets, $20 widgets, and $50 widgets. All widgets will always cost some round dollar amount, never anything like $10.99. My report shows weekly, month-to-date, and year-to-date sales for each widget denomination by both count and total amount by state. For example:
                                   $10                          $20                              $50
         count     amount       count       amount         count       amount
    New York
           Week        5             $50           4                 $80             1               $50
            MTD
            YTD
    Delaware         1              $10
    etc.
    I also have totals by row, along with mark-up amounts (11% of gross sales amounts) and net sales (gross - mark-up). These last 3 columns are included in my dataset, not calculated in the cross-tab.
    My problem is that I can't figure out how to do 2 things:
    1.  the count columns for mark-up and net will always be blank, so I want to suppress the "count" column header
    2. I want to display the dollar amounts for those 2 columns with 2 decimal places, but the other amounts with no decimals.
    Can this be done, and if so, how?
    Thanks!
    Phil

    Hi Phil,
    I also found the following information under Cross-tab Help for suppressing rows or columns.  I hope this is what you're looking for.  Sylvie
    To suppress empty rows and columns
    Right-click the blank top-left area of the Cross-Tab and select Cross-Tab Expert from the shortcut menu.
    The Cross-Tab Expert appears.
    Click the Customize Style tab.
    Select either the Suppress Empty Rows or Suppress Empty Columns check box.
    Click OK.
    Now, when you print the report, empty rows and/or columns will not appear.
    To suppress row and column grand totals
    Right-click the blank top-left area of the Cross-Tab and select Cross-Tab Expert from the shortcut menu.
    The Cross-Tab Expert appears.
    Click the Customize Style tab.
    Select either the Suppress Row Grand Totals or Suppress Column Grand Totals check boxes.
    Click OK.
    To suppress subtotals and their labels
    If you have more than two groups in your Cross-Tab you can suppress the subtotal and label for one of them.
    Right-click the blank top-left area of the Cross-Tab and select Cross-Tab Expert from the shortcut menu.
    The Cross-Tab Expert appears.
    Click the Customize Style tab.
    Click the field whose subtotal you want to suppress.
    The Suppress Subtotal and the Suppress Label check boxes become active.
    In the Group Options area, select the Suppress Subtotal check box.
    Click the Suppress Label check box to suppress the label associated with subtotal.
    Click OK.

  • Cross-tab row header

    i use the display string conditional formula on cross-tab row header. but it ends up every row has the same value.
    how can i solve this? is that possible to do it in crystal report?
    thanks,

    Hi,
    could you please make it more clear what exactly u want to display and what is the problem that u r facing in doing the same.
    Regards,
    Misra p.

Maybe you are looking for