Calculation in crosstab

Now, i compile a crosstab report to show some statistics on system usage, and want to make some calculation base on this result then show in crosstab
my case:
created-deleted-view-total-calculated result
user 1.......3...........3..........3........9.............21
user 2.......2...........2..........2........6.............14
What I want to do is add the calcuation and show in crosstab
the calcuation will be
action(created)2 + action(view)2+total
I had try to set a formula field and add into the crosstab
but doesn't work, (i use count( in "created") *2....)
please share opinion

i was wondering if you could be more specific, i am having great difficulty getting my cross tab to total properly.
it is a simple crosstab, it counts users, i get the value per user correct by using maximum(userid) but to sum, or count, or distinct count doesnt give me correct results.
in your response to this person you stated
Create a conditional suppression formula for the sumarized fields that assigns the currentfield value you want to a variable. End the suppression formula with False.
In the total field create a display string formula that declares the variables and adds them together and convert that to a string
could you be more specific on the above, not sure if this would help my situation, but i will try it.

Similar Messages

  • Calculations and crosstab view customization

    hi All,
    i am a beginner at olapi and BI beans. i am trying to understand if we can use bi beans to meet our users requirements. i have some questions here.
    1. lets take sales measure. i'd like to define new measure or calculation that shows difference from january-2001. and i'd like to get something like this:
    __________dec-2000 jan-2001 feb-2001
    world -10 0 10
    americas -2 0 2
    asia -2 0 2
    How could i achieve it with bi beans.
    I'd prefer to avoid coding (using DML or olapi). i think it would be better to give users a tool to build such things.
    2.How can hide some rows/columns in the crosstab.
    For example i drill down to month but i want to hide data from all of them except january and december.
    3.I looked through bi beans api and i found out that for example Query class implements 18 interfaces!!! Isn't something wrong with it? It seems to me that olapi and bi beans are a bit awkward.
    Best regards.
    Igor.

    hi
    regarding your calculations: eithe do it in the base deta or use the calculation bulder to achieve what you want (no need for dml/olapi coding)
    for the suppresions: well just use the features of the querybuilder, especially the "add/remove/keep" choice you are offered: this way you can do this very easily. another way is based on scoping:thus data only visible based on group/single access
    interface:whats wrong ? its due to java: you can derive from a single class, but are able to implement several interfaces ;)
    regards,
    thomas

  • Calculation in crosstab report

    Hi
    i am using visual studio 2003 to devlop reports.
    In a cross tab report  i took description, aspect as row and id as column and pointvalue in summarized field.
    now my report look likes
    d1   a1    0     1    1(total)      50%( percentage 1/2)
    how to calculate percentage.
    Thanks.

    well when you place any field in the row of the crosstab it makes it as a group anyway. So asking whether it is mandatory or not is not a question. It will do it as default.
    You have to adapt the same concept of percentage as what you do in other reports, if the percentage in the crosstab is not coming out as expected or you want to change it then you can use either Display String (X+2) under format field, to display different percentage.
    Let me give you an example which might help.
    I have a report which calculates number of days against number of jobs. So x jobs took x amount of days. Later I had to add percentage to it so what did I do?
    Number of days - Jobs - Percentage
    1 (Row) - 12 - 13%
    2 (Row) - 11 - 12%
    3 (Row) - 14 - 16%
    4 (Row) - 13 - 15%
    Used a formula to calculate number of days and placed it in row. Placed Jobs under Summarised field. Placed percentage (which is exactly the same field as Jobs) under summarised field.
    On percentage field right click field while report is in design mode and clicked Format Field-->Comman tab->Display string--->Placed my percentage formula there.
    Refresh the report and whola! it works
    Hope this helps
    Regards
    Jehanzeb

  • Are BI Beans already installed with Developer Suite 10g R2?

    I wish to use BI Beans in Forms Builder 10g R2. Do I have to download the BI Beans separately or it has already been included when I install Developer Suite 10g R2? Thanks.

    If you are planning to use Forms against a relational data source then you will only be able to use the BI Graph bean as part of your development. The graph bean is automatically shipped with JDeveloper and there is no need to install BI Beans.
    There are lots of examples of how to use the graph bean with relational data sources and these can be found on the following sites:
    OTN Reports Home Page - Links to the FAQ on graphing
    BI Blog - posting on how to use the graph bean
    BI10gR2 samples - contains a JSP example of how to use the graph bean with a relational and XML data source.
    Forms does not support multi-dimensional data sources so there is no way to use the other BI Beans components such as query builder, calculation builder, crosstab beans unless you are using a multi-dimensional data source which requires use of Oracle OLAP (preferably 10gR2).
    What do you want to build with BI Beans?
    Keith Laker
    Oracle EMEA Consulting
    BI Blog: http://oraclebi.blogspot.com/
    DM Blog: http://oracledmt.blogspot.com/
    BI on Oracle: http://www.oracle.com/bi/
    BI on OTN: http://www.oracle.com/technology/products/bi/
    BI Samples: http://www.oracle.com/technology/products/bi/samples/

  • Calculation based on totals in Crosstab

    Hi,
    I have the following crosstab.
    Vendor 1234
         Dc Nbr 1     2     4     
    Sum Invoice Amt      1387.04     300.82     327.29     2015.15
    Sum Cost 44.86 57.43     25.54     127.83
    Sum Advanced Cost     102.44     0     0     102.44
    Sum Consolidation Cost     30.37     0      0     30.37
    Sum Allowance Amt     27.74     6.02     6.54     40.30
    Net Freight Cost     149.93 51.41     19     220.34
    Freight Percent     10.81     17.09     5.81     ****
    The last column are Row totals for those fields.
    What I need is how to get the **** to be 10.93 which is the Freight Percent calculation value based on the Total Column fields. The
    Frieght Percent field is calculated as follows for the rows.
    ( NVL(Sum Cost,0)+NVL(Sum Advanced Cost,0)+NVL(Sum Consolidation Cost,0)-NVL(Sum Allowance Amt,0) )/NVL(Sum Invoice Amt,0)*100                         
    I have tried to do the Row Total with Average, Sum, etc, but not getting the answer we need.
    Table structure is 3 rows per vendor with 1 row per dc nbr.
    Any help would be greatly appreciated.
    Thanks
    Edited by: clifford_d on Dec 4, 2008 9:46 AM

    See if this explains it better for my crosstab with page items of Vendor Number 1234.
    Vendor 1234
    Dc Nbr 1 2 4 AAAA
    Sum Invoice Amt 1387.04 300.82 327.29 2015.15
    Sum Cost 44.86 57.43 25.54 127.83
    Sum Advanced Cost 102.44 0 0 102.44
    Sum Consolidation Cost 30.37 0 0 30.37
    Sum Allowance Amt 27.74 6.02 6.54 40.30
    Net Freight Cost 149.93 51.41 19 220.34
    Freight Percent 10.81 17.09 5.81 ****
    As stated before, Frieght Percent is a calculation I created in Discoverer that looks like this :
    ( NVL(Sum Cost,0)+NVL(Sum Advanced Cost,0)+NVL(Sum Consolidation Cost,0)-NVL(Sum Allowance Amt,0) )/NVL(Sum Invoice Amt,0)*100
    Column AAAA was created in Discoverer using Sum of field and show to the right.
    What I need is for the **** to be the correct calculation for the totals in column AAAA. If I use do a total for Freight Percent using the Cell Sum I get 33.70., what I want is it to be 10.93, which is (127.83 + 102.44 + 30.37 - 40.30)/2015.15*100.
    If I use an Average Total row for Freight Percent, I get 11.24 which is 33.70 / 3 (the 3 would be the # of dc nbr's)
    I did start with using the detail level data to create this crosstab. Then I made a new version and used the SUM data. I seem to get the same results but am still having issues with the one **** value.
    Hopefully this explains it better.
    Thanks for the ideas so far.

  • How can I do calculation positioning in crosstab?

    I have a calculation that should be displayed in only one column, at the right of a crosstab. Discoverer insists to copy my calculation under all columns, repeating the same result under each.
    Is their a way to fix it at one place?

    this is an example of how you can accomplish this with Region along the x-axis.
    You need to do the same thing with the ages to get age along the x-axis.
    I'm not sure it is an ideal solution given the large range of ages.
    For each region, create a calculation as follows:
    Calculation named 'Region A'
    SUM(DECODE(Region,'Region A',[person count])
    Calculation named 'Region B'
    SUM(DECODE(Region,'Region B',[person count])
    Calculation named 'Region Z'
    SUM(DECODE(Region,'Region Z',[person count])
    Then a final calculation, to get the percentage:
    Calculation named 'All regions'
    something like
    (SUM([person count]) OVER (Parition by AGE])) / SUM[person_count]
    which will divide the [person count] for that row (age) by the total [person count].
    To get Age along the x-axis you need to create a calculation for each age, and the final calculation will be
    (SUM([person count]) OVER (Parition by Region])) / SUM[person_count]

  • Conditional Calculation/Filter in Crosstab

    Hi All,
    Is there a possibility to make conditional calculation in a crosstab ?
    I want to filter some records, if their key figures are under a certain value.
    There is a possibility to write formula for that key figure and suppress related records (e.g if key figure is < 100 etc..). But I want those records not to come to cross tab at all. In BW queries, we can create "condition" for that purpose. I wonder if there is such a functionality in CR also.
    Thanks in advance
    Ozan

    Hi,
    1. create a formula field in the field explorer.
    Example: Formulafield name is "Sales" and the formula is
    IF >20000 then
    2. Create Cross-tab, go to Cross tab Expert , select the previously created formula field into summarized fields.
    Regards, Anil

  • Data missing in Crosstab report with calculated field via case when

    I use the Oracle 10g discoverer. When I create a crosstab report with a calculate field via function case when and put it as datapoint, some of the data is not showing. I tried to not use the case when function for the calculate field, then all the data show.
    I really do not the reason. Could anybody help me out with many thanks?

    Let me explain more.
    I have the original data below.
    Work order, Team, Hours_worked, date
    800001, S1, 5, 2012/01/01
    800001, S1, 15, 2012/01/10
    800001, S2, 4, 2012/01/04
    800002, S1, 3, 2012/01/15
    There are multipul records for the same work order, team on the same day or different.
    Finally I want to set the start date and end date as the parameter to create a crosstab report format like
    start date>=2012/01/01 and close date<=2012/01/05
    Team
    Total hours total hours within the range
    Work order S1 S2 ... S1 S2 ...
    800001 20 4 5 4
    800002 3 0 0 0
    in order to do it, I create two parameters independently start date and close date. Then I create a calculate field hours_worked_withinrange via
    Case when date>=:start date and date<=:end date then Hours_worked else 0 end
    This calculated field is correct in the tabular format report in discoverer desktop. But when I duplicate the list as crosstab. Some data is missing in crosstab data point.
    I checked once I change the calculate field defination not use case when. (For example, C1=hours_worked*2). Then everything runs correct.

  • Use average of crosstab columns in a calculation in the crosstab.

    Using XI R2  I have a crosstab where I need to have the average weeks sales i.e. the sum of one row divided by the number of columns. I've done this in two ways -
    =Average([Forecast Weeky Qty]; IncludeEmpty)
    =[Forecast Weeky Qty]/Count([Forecast Weeky Qty])
    both of which return the correct value provided it is displayed in a cell outside the crosstab. The problem is if that variable is used in the crosstab it just displays the [Forecast Weekly Qty] for that column i.e. it's not doing the calculation at summary level as I need.
    How can I create an average that will display in the crosstab as the same figure in each column (the overall average) and can therefore be used to calculate another row in the crosstab?
    eg
    Sales - 50, 50, 75, 25, 50    should give average of 50. What I get when I put it in crosstab is
    Avge - 50, 50, 75, 25, 50    WRONG.  What I want is
    Avge - 50, 50, 50, 50, 50
    Thanks
    John

    No, your query doesn't work as illustrated below. Your SQL returns views. Your SQL returns rows that have data that isn't null in them because it relies on the table analyze data which will be out of date when the query is being run.
    select * from user_tab_columns u
    where u.HIGH_VALUE is null;
    no rows selected
    SQL> CREATE TABLE test1
    a    NUMBER
    Table created.
    SQL> select table_name from user_tab_columns u
    where u.HIGH_VALUE is null;
    TABLE_NAME
    TEST1
    SQL> CREATE VIEW test_view AS
    SELECT * FROM test1;
    View created.
    SQL>
    SQL> select * from user_tab_columns u
    where u.HIGH_VALUE is null;
    TABLE_NAME
    TEST1
    TEST_VIEW
    SQL> INSERT INTO test1 (a) VALUES (1);
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> select * from user_tab_columns u
    where u.HIGH_VALUE is null;
    TABLE_NAME
    TEST1
    TEST_VIEW
    SQL> select * from test1;
             A
             1
    SQL>

  • Calculating a difference between two columns in a crosstab report

    I have a crosstab report showing # of sales by salesperson in each of 2 years and within each of 2 categories of salesperson (old vs new). I want to create a column showing the difference between sales in 2009 and 2010 within new salespersons  and then a column showing the difference between 2009 and 2010 within old salespersons. I can't figure out how to pinpoint in the variable editor the column containing 2009 sales by new agents. Any advice?

    You can hard-code the formulas like this:
    =Sum([Sales]) Where ([Year] = 2009)
    =Sum([Sales]) Where ([Year] = 2010)
    Then the variance becomes:
    =Sum([Sales]) Where ([Year] = 2010) - Sum([Sales]) Where ([Year] = 2009)
    The challenge with this is the years are not dynamic, but I figure I will throw this out first and see if it gets you what you want to start with.

  • Crosstab Profit Margin Calculation

    I have a crosstab with SalesRep as rows and Product as Columns. I have SumSales and SumCost in the intersecting cells.
    How do I subtract SumCost from SumSales and display this result (SumProfit) in each cell?
    Is there a way to calculate the profit margin percentage in each cell .... (SumProfit/SumSales) * 100.
    Thank you.
    Art

    I Art
    I have two fields last year costs and last year sales.
    I created a formula field in which I wrote the below formula
    product.last year sales - product.last year cost
    I opened the cross tab expert and I put this formula field in summarized fields. I clicked on change summary and checked that by default "calculate this summary" is a sum.
    I checked the options for "Show as percentage of".Click on Ok.
    Please let me know if you could get the desired output after trying a similar way like above.
    Regards
    Sourashree

  • Independent Stand-alone calculation for each Crosstab

    Hi All,
    In my report, I have two crosstabs in two different report header sections. In the first crosstab, I have Division and Company chars.
    In the second crosstab I have Category and Company chars. I have one key figure (KF) in both crosstabs.
    My expectation is to see independent, stand-alone results for these two crosstabs. But this is not the case..
    Sum of Company X in the second crosstab (which is for category level) is displayed in the first crosstab (division level) for Company X.
    But in my scenario, Company X has a different value in division level..
    When I remove the second crosstab (category level) and refresh the report, then I see correct values for Company X in division level.
    How can I tell the CR that each crosstab should run separately, without being influenced from other ones?
    Below, I tried to show the issue..
    Crosstab1:
    Division A...........100
    Company X..........55  -
    >  This is sum of below crosstab values (for company X).
    Crosstab2:
    Category C........60
    Company X........20
    Company Y........10
    Category D........40
    Company X.......35
    Company Y.......5
    Thanks
    Ozan

    Hi Ozan,
    One of your crosstab will need to be a subreport.  The reason they both show the same result is they are both using the same recordset.  Your second crosstab needs to be run as a result of the Company in Report1. 
    Try creating a group in your report and drop the first Crosstab into the GroupHeader. 
    Now create a new report that matches your second Crosstab.  Insert this new report as a subreport into the GroupFooter. 
    That should give you the result your looking for. 
    Good luck,
    Brian

  • Calculating columns in Crosstabs - CRIX

    Post Author: Jimi H
    CA Forum: General
    Please help!!!  I cannot seem to find an answer to this one even though the question has been posted before.
    I have two columns in a cross-tab and need to divide one by the other.  I have created a formula to do this (my 3rd column) but CR9 calculates the total of column 1 not the individual row.
    i.e. Data is grouped by Date.
    Column 1 is no. of loads. 
    Column 2 isJob Price. 
    Column 3 needs to be £/load. 
    When creating the formula to do Job Price/no. of loads instead of dividing by the no. of loadds for that particular date CR takes the total from the bottom of the cross tab and uses that figure instead.  Does anyone know how to get round this so that the correct figures are used.  Thanks

    Post Author: Jimi H
    CA Forum: General
    Hi thanks for the reply.  The header says CRIX though!?!
    Anyways, this is the same procedure I have followed in CR9, formula @£/load is {@Job Price} / {@Load Count} but instead of using the summarised Load Count figure for that particular date(this needs to be a distinct count of job booking numbers, hence the formula), CR still uses the Grand Total figure.
    i.e Job Price = £200, No. of loads = 10 for 01/11/07.  £/Load should be £20.  But the grand total for No. of loads for all of November is 907.  CR is doing the sum 200/907=£0.22.
    Any ideas?

  • How to avoid crosstab - Show number of days according to groups

    Morning all,
    I think you all would agree with me that even having crosstab as a great tool in Crystal 2008, there are still quite allot of limitations to it.
    I have created a report using crosstab which shows number of days and jobs according to those days grouped by account number, product code, sales area. This report is working fine until my director asked me to further group those days according to sub categories of lenses.
    For example
    Crosstab shows
    Number of days - Day 1,day 2, day 3
    Number of jobs - 111----123--1213
    Percentage - -
    12%---34% 60%
    Now if you look at the example it says day 1, 111 jobs went out. What the director would like to see is those jobs being sub divided into types of lenses.
    So out of 111 jobs, 25 would be Finished lenses, 30 could be uncut lenses and so on.
    The new report should be like this
    Number of days -
    Day1---Day2---Day3
    Number of Jobs:-
    Finished -
    25--34-----23
    Uncut--3045-----23
    AR--7056-----76
    Total----125135----122
    Percentage:-
    Finished -
    25%--34%-----23%
    Uncut--30%45%-----23%
    AR--70%56%-----76%
    Total----100%100%----100%
    Now if we look at the above criteria it seems that I have to use groups even further down the report where I am using crosstab at the moment. This means I have to get rid of the crosstab and run a report manually.
    However the big question is, how to get the report calculating number of days and jobs according to customer account number, product code and sales area manually?
    I tried the following formula but this requires to write way too many formulas, for example some of the jobs have taken more than 60 days and if i use this formula I have to write 60 formulas for number of days which is not feasable.
    **//provided by IIbas in another forum**
    whileprintingrecords;
    numbervar day0;
    numbervar day1;
    numbervar day2;
    if {@workingdays} = 0 then
    day0 := day0 + 1 else
    if {@workingdays} = 1 then
    day1 := day1 + 1 else
    if {@workingdays} = 2 then
    day2 := day2 + 1 else //up to the maximum number of days.
    Then in the report footer, reference the days in separate formulas, and identify them with text boxes, e.g.,
    //{@day0};
    whileprintingrecords;
    numbervar day0;
    I can sort out the Finished, uncut,AR by grouping them however I am wondering how to create a manual running total of jobs complying with number of days without using crosstab.
    Any ideas?
    Many thanks
    Regards
    Jehanzeb

    no answer closing

  • How to display a percentage sign in calculated member column?

    Hello all,
    in my report I have a calculated member column whose value is determined by follwing value formula:
      if CurrentColumnIndex - 2 = 1 then 
            If GridValueAt(CurrentRowIndex, CurrentColumnIndex-3, CurrentSummaryIndex) = 0 then 
            0 
            else 
            (GridValueAt(CurrentRowIndex, CurrentColumnIndex-1, CurrentSummaryIndex)/ 
            GridValueAt(CurrentRowIndex, CurrentColumnIndex-3, CurrentSummaryIndex)) * 100 
        else 
            If GridValueAt(CurrentRowIndex, CurrentColumnIndex-5, CurrentSummaryIndex) = 0 then 
            0 
            else 
            (GridValueAt(CurrentRowIndex, CurrentColumnIndex-1, CurrentSummaryIndex)/ 
            GridValueAt(CurrentRowIndex, CurrentColumnIndex-5, CurrentSummaryIndex))*100 
    Returned is a numeric value and it is being correctly displayed in calculated member column. As the value should represent percentage, I need to display a % sign after every value.
    How would I achieve this? I have seen a thread here in the discussion where approach with a formula and DisplayString function is mentioned - but there are no details how this could be achieved....
    The crosstab in question looks like this:
    Calculated Member is based on "REV_TOTAL" group column.
    I also attached the .rpt file (renamed to .txt for upload)
    Many thanks in advance,
    Marin

    Hello Raghavendra,
    thanks for the quick reply.
    Unfortunately it is not as easy at it seems - calculated member column is not showing in report designer and I can not apply the suggested approach with formatting toolbar...
    The column only shows here (right click on table ->  "Advanced Calculations" -> "Calculated Member...") and there is no possibility to format it directly:
    Any other suggestions?
    Many thanks,
    Marin

Maybe you are looking for

  • PDF in-browser will not show attachments panel

    Hi. I'm working with a PDF with attachments. I created it to open with the attachments panel visibile. It works fine except for in Chrome, it shows the PDF in-browser but the attachments panel is not visible. This is causing some problems for our sit

  • Broken networking ?

    Hello, I have been using Arch on my laptop since Januray with no major problem. Till sunday still it was all good, but I have moved in a new flat with a cable modem I can't use with Arch it seems... It's plugged on the same ethernet NIC I was using b

  • DIAdem.exe :applicati​on error

    HI , I have a .NET application as service which call Diadem using OLE DIAdem.Tocommand(). Diadem will be called simultanessly one after another for a series of test. It is quite hard to explain the complete procedure. I'm attaching a diagram which wi

  • Suggestion for Muvo TX (

    Now when a song plays I only see the title of the song, what is weard because on most mp3 player's you see: "(artist name) - (song name)". I hope you guys can make a small firmware update so the song information is displayed good. Thanks in advance,

  • Alv and checkboxs

    Guys, Ive a problem with a ALV and checkboxs. i have one with column type checkbox, i need mark rows and take them afterward using a button (in ALV) but rows arent marked when i use button. i have seen that it only happend when i use double click in