Add ratio column in Cross Tab

Hi Expert!
I am young of Crystal Report. I have some problems with using cross tab report.
Rows: hour/Floor, Columns: Floor,  Summarized Field: Sales
I want to show the result as below:
hour/Floor_____________ Floor1___________Floor2__________Total________Ratio
7h-10h     _____________ $500 ___________ $1000 __________$ 1500______75%
10h-13h_______________$200 ___________$300___________$500________ 25%
Total__________________$700___________$1300__________ $2000________100%
I want to add  Ratio to show on the right after Total Column.
Can I do like this or not? Or Is there another way to do that with the same result?
Regards,

This post looks remarkedly like [Add Column to Cross-tab in Crystal Report|Add Column to Cross-tab in Crystal Report;
Please see it for my replies.
Debi

Similar Messages

  • How to Add new column in cross tab reports

    I am using crystal reports 10
    I created cross tab report for monthly sales. I need to add one more column in that report
    ex:
    Month   Customer    Part1  Part2    Part3      
    Jan         A               10       12         15        
    Jan         B                20      0           10        
    Jan         C               0         3           5          
    Feb        A               5         10          8          
    Feb        D               55        23        33        
    In above data Parts are no limit, thatswhy i am taking cross tab report.
    I am taking Month and Customer name as Rows,
    Part Codes as Colums,
    Quantiry as Total fields in cross tab Report.
    Here month field is storing as Transaction date in database, I am calculating by month
    I am getting upto this.
    User needs add one more field is Invoice no
    Month   Customer    Part1  Part2    Part3        Invoice no
    Jan         A               10       12         15          B1,B2,B3,B4
    Jan         B                20      0           10         B12,B30
    Jan         C               0         3           5           B6
    Feb        A               5         10          8           B35,B40
    Feb        D               55        23        33          B25,B56
    How to add invoice nos by group wise(By customer and  By month)
    Thank you.
    Raja shekar Reddy K.
    Edited by: Raja shekhar Reddy on Apr 16, 2009 5:10 PM

    Dear Amogh,
    Thanks for u'r  Replay.
    If i use new crosstab for Invoice no each invoice number can display like seperate columns.
    But I need Invoice  no in single column with seperate with "," or "/".
    Thanks & regards,
    Raja Shekar Reddy K.

  • Limiting Columns in Cross Tab reports

    Plz tell me how to limit columns in Cross Tab.I have many columns which go on and even are not visible for Scroll and neither in another page
    Plz help.

    Check if http://winrichman.blogspot.com/2009/05/cross-tab-by-limiting-number-of-colums.html is helpful

  • SAP Web Intelligence -Comparing subsequent columns in cross tab

    Hello,
    I am new in SAP web intelligence , I need formula (Not a SQL Query) to find difference of values between subsequent columns in cross tab. Please find attached excel for more details
    Thanks & Regards

    Try something like in below screenshot-
    Craete variable
    Diff Amount2=Previous([Amount2])-[Amount2]
    ~Anuj

  • Add a new column to Cross tab.

    Hi all,
    I have a rtf template
    Where I have a cross tab,
    Product Code as row header and Month as column header(Jan,Feb,......Dec) and Quantity as measure.
    I need to add Product name right beside the Product code column.. I am not sure how I do this in cross tab. Any help is greatly appreciated.

    Hope your vacation was good:)) Can we expect your effort now, when relaxed, on contributing here on SDN?;))
    I don´t know I you know that you can easily drag something (a node) from your data view (what comes from the backend) and drop it onto your form layout. This way the editor will generate everything for you. That means, you shoud:
    - delete the current table
    - drag and drop the new one (if the context knows already a new field)
    And that should be it. Like 10 seconds action. But you should probably copy your form and experiment with the copy.
    Regards Otto

  • Creating a header for rows/columns in cross-tab with syntax

    Hi,
    The issue is creating strings for rows or columns' headers. How can I create a formula field which contains more than one seperate string. Such as "aaa", "bbb" and "ccc" are headers and they should be in seperate columns. In short, they will behave like characteristics of one of my query's field but they are just headers of the columns.
    ..............aaa...bbb...ccc....
    row1.......x.......x........x.....
    row2.......y.......y........y.....
    Also there is another issue about the formulation again. Is there any operator that does the same job as " \n" which is used in C languages to break the line?
    before:
    aaabbb
    after:
    aaa
    bbb

    Hi Carl;
    Firstly, thanks for answering my question. To explain my problem there are two options ahead(for my first question); first one is writing down the actions step by step, the second one is posting an image file(jpeg etc) to visualize it. I think the first one will be enough. If not tell me
    Step 1- Create a cross-tab and right click and select cross-tab expert.
    Step 2- Click the button "New Formula" and write down any word(such as "Sales") between two -"- sign to make it string.Then save and close.
    Step 3- Drag and drop the created formula to "columns" section and fill the other necessary sections with your database's(such as xtreme.mdb which is famous for crystal users) fields.Don't forget to add another column value to "columns" section, since our formula has no link to database.
    Step 4- Then click OK to save the changes and lets preview the cross-tab.The result will have one top column and his child or children(that depends on your data). And this top column is behaving like a header not a field.
    Now turn the second step but write down a formula for 2 columns or more.For exmple "Sales" and "Profit".So the result will have 2 top columns and their child/children.
    My question is "what is the formula for 2 or more columns?"
    Also I couldn't get the answer for my second question. What is the meaning of expressions "\c" and ChrW(13)?
    Edited by: diabolus on Oct 30, 2009 9:39 AM

  • Multiple columns in Cross Tab

    Hello All,
    Can anyone suggest me how can i create a cross tab report that has multiple fields in columns and multiple fields in summary?
    I have 10 formulae for the columns and 10 for the summary. But if I add more than one in columns or it gives some extended report which i want to avaoid. How can i get a normal cross tab report.
    Thanks
    Robinn

    Please re-post if this is still an issue or purchase a case and have a dedicated support engineer work with you directly:
    http://store.businessobjects.com/store/bobjamer/DisplayProductByTypePage&parentCategoryID=&categoryID=11522300?resid=-Z5tUwoHAiwAAA8@NLgAAAAS&rests=1254701640551

  • Additional columns in Cross tab

    If I have Project name as the column and project count as the summary in a cross tab
    for eg
    ProjectA,ProjectB, ProjectC
    3,             4,           5
    CaN i add additional columns next to project C having  some condition related to these projects and project counts and then get the grand total??
    Thanks

    Let's see...  This is about the tenth time I've answered this question in the past few weeks, but, hay, let's do it again! 
    The only way I am aware of adding columns to a crosstab is by including new data in your database query.  So, if you currently are returning the data
    Project    Count
    ProjectA   2
    ProjectB   4
    ProjectC   5
    Than, probably using a database command for the data source, change it to return
    Project    Count
    ProjectA   2
    ProjectB   4
    ProjectC   5
    Totals     11
    How this is accomplished very much depends on your database tables and what additional columns you want to add to the crosstab.
    HTH,
    Carl

  • Sub-Summarizing columns in Cross Tab

    Post Author: valkyriexp
    CA Forum: General
    Hi,
    I'm fairly new in using CR, I wonder if anyone could help me.
    I have a cross tab report of projects in rows, activities in columns and hours in table, i need to insert  few new columns that have the sum of hours of the selected activities. Is that possible without breaking the report into sub-reports?
    some thing like
                      Act1         Act2      Sum1&2     Act3      Act4      Act5      Sum3&4&5   .....
    Proj1             1             1              2              4            2           1              7
    Proj2             2             1             3               1            0           0              1
    thanks for the help

    Post Author: valkyriexp
    CA Forum: General
    After spending half a day i was able add a new field to each column to does the job, small piece of macro is doing the summation, now i have the problem to set the width of empty fields to zero, can anyone help?
    WhileReadingRecords;global NumberVar sumnum;global StringVar OutStr;
    if {jobs.acts}="Act1" or {jobs.acts}="Act3" then     sumnum:={jobs.hour}else if {jobs.acts}="Act2" or {jobs.acts}="Act4" or {jobs.acts}="Act5" or ... then    sumnum:=sumnum+{jobs.hour}else    sumnum:=0;
    if {jobs.acts}="Act2" or {jobs.acts}="Act5" then    OutStr:=cstr(sumnum);else    OutStr:="";
    the result would be like the following table, now i need to set the width of empty fields to zero:
                      Act1         Act2             Act3      Act4      Act5        .....
    Proj1             1            1      2           4            2          1     7    
    Proj2             2            1      3           1            0          0     1    

  • 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

  • More than one summary column in cross tab reports

    Hi,
    I have a cross tab report.  The summary column is SUM. I want to add another summary column next to SUM which will be AVG(Average) column.
    Any ideas?
    Please see the attached image.
    Thanks,

    hi Anurag,
    my fault...i should have looked closer at your data.
    here's the easy way of showing two sets of summaries at the end of a crosstab, without having duplicate columns.
    1) copy your existing cross-tab and paste it to the right of your current cross-tab.
    2) now go to the cross-tab expert of the new cross-tab and remove the fields from the Column dialogue
    3) change the summary to an Average
    4) exit the cross-tab expert and go to the Section Expert for the section where both cross-tabs are...ensure that you check Relative Positions
    preview the report. now you'll have to move the 2nd cross-tab a bit so that it aligns properly with the first one.
    as a sample, see the attached report. extract the contents and change the .txt extension to .rpt.
    -jamie

  • Suppressing a prior Year Month Column on Cross Tab Report

    I have two cross tab report in the footer that compares orders booked against what was shipped by month.  I need to suppress the columns (Month) for the prior year but keep the Totals.
    I have a pdf of the report

    Try to add a formula as a column in the crosstab instead of a field. Create a formula like this
    if year()=year(currentdate)-1 then
    year()
    else
    month()
    This works only for two years of data, means you need to have the record selection formula like this
    year()>=year(currentdate)-1 and year()=year(currentdate)
    Regards,
    Raghavendra

  • How to count number of columns in cross-tab report

    I have created a cross-tab report and have managed to get the data out as below:
                 Jan     Feb     Mar....(display of months will auto expand) Avg/Mo  Total
    UserA     4          3        4                                                                         11
    UserB     6          1        1                                                                          8
    UserC     5          5        5                                                                         15
    Total       15        9        10                                                                        33 
    I want to insert a calculated column (Avg/Mo) into the cross-tab report based on the formula: Total/Number of Months. I used this calculation formula  for Avg.Mo column:
    (GridValueAt(CurrentRowIndex, CurrentColumnIndex+1, CurrentSummaryIndex)/GetNumColumns)
    However, I get the wrong average since GetNumColumns count the total number of columns including the column of Avg/Mo and Total.
    How do i get the number of columns, excluding the Avg/Mo calculated column and Total column?
    PS: I can't use hardcode since the number of months/columns will auto expand the months progress...
    Edited by: jutamind on May 26, 2010 9:27 AM

    ok managed to solve this by slightly changing the formula:
    GridValueAt(CurrentRowIndex, CurrentColumnIndex+1, CurrentSummaryIndex)/(GetNumColumns-2)

  • Hiding a column in Cross tab

    Hi all,
    Could any one provide me a solution to hide a cross tab column.
    My cross tab has the Dimension in the rows and date values in the columns
              Dec'06 Dec'07 Jan'08 Feb'08..........Dec 08
    DIM1     20         10       35        28                 26
    DIM1    30          20       15         14                 22
    Some reason am bringing Dec'06 data and this data is coming from the universe.
    So now I would like to hide this Dec'06 column in the cross tab how can I achieve this?
    or is there any solution to hide first column in the cross tab?
    Any help would be highly appreciated.
    Thanks

    Hi all,
    For this I just created a variables as below first for Prior Prior year end as I always need to hide prior prior year Dec data so created a variable as below
    Prior prior year end=ToDate("31/12/"+FormatNumber(Year([Date]);"0000");"dd/MM/yyyy")
    after that created another variable like
    If([date]=[Prior prior year end];"Y";"N")
    Now created a filter saying filter cal date="N"
    It is hiding all the years december data but I only want to filter only prior prior year end
    any help pls
    Edited by: VP S on Feb 10, 2011 5:21 PM

  • Dynamically color to each column in Cross-tab report

    Hello All,
    I am a newbie in Crystal report,from last few weeks, i am working on cross tab crystal report.i have a requirement to show color dynamically for each column.i am adding an attachment how i want it. i tried dynamic coloring using object field formula but it is showing red color to all data.i want red color data when in 2nd  cross tab report data is beyond upper or lower limit in first cross tab table. it will be very helpful if somebody will give me any clue on this.... i read so many articles now it seem like impossible for me..:(
    i am using visual studio 2010 and sap crystal report version 13.0.0.99 for visual studio 2010.

    Hello Manish,
    I have attached a sample report that does this. You will need to remove the .txt extension from the attached file to open it as an .rpt file.
    Please right click on one of the value fields of the first cross tab in the report > Format Field > Common > Suppress if Duplicated conditional formula.
    The nested formula is as follows;
    numbervar array l;
    numbervar array u;
    numbervar x:=CurrentColumnIndex;
    if GridRowColumnValue ('@limit') = 'lower limit' then
    (redim preserve l[x];
    l[x]:= tonumber(CurrentFieldValue))
    else if GridRowColumnValue ('@limit') = 'upper limit' then
    (redim preserve u[x];
    u[x]:= tonumber(CurrentFieldValue));
    false
    So it assigns each lower and upper limit value for each client (in the sample it is country) to an array using the cross tabs column index to index the array and it ends in False as we don't actually want it to suppress if duplicated. This nested formula is just used to generate the arrays of upper and lower values.
    In the second cross tab if you again right click on one of the value fields > Format Field > Font > Color you will see the following conditional formula;
    numbervar array l;
    numbervar array u;
    numbervar x;
    if not(tonumber(CurrentFieldValue) in l[CurrentColumnIndex] to u[CurrentColumnIndex]) then
    crred
    else
    crblack
    So this compaes the current field value to range generated by the 2 arrays and assigns a color based on whether or not it is in the range.
    Regards,
    Graham

Maybe you are looking for