Formular Column

I need to netout two columns ( Purchase and Supply). How can I have a separate column that will calculate the difference in the purchase and sales amount on a report.
Can anyone show a good and easy way ?

I assume you have a query the returns some value for Purchase and another one for Supplies, and you are trying to figure out the difference? A formula column will do the trick. Create a formula column in the same group as those other columns. In the PL/SQL of the formula column do your calculations. If it is simple, your PL/SQL can be as easy as:
return :Puchases - :Supplies;
Remember, the formula column acts like a PL/SQL function, and what you are doing is returning a single value.

Similar Messages

  • Formula column

    Hi,everyone:
    I am trying to create a formular column, which will be a sum of two columns from two different queries.
    In the data model, I could not put this CF_1 in neither of the two queries, so I put it outside the two queries, which is supposed to report level formula column.
    When I ran the report, the error message is:
    REP -1517. Column 'CF_1' references column 'Sales1' which has imcompatible frequency.
    I don't where I should put CF_1 in the data model.
    Thanks.
    null

    All right Les,
    Create a summary column CS_1 outside the queries.
    Function: SUM
    Source: Your 1st querys column (ex:
    Reset At: Report
    Likewise create another summary column CS_2 outside the queries.
    Function: SUM
    Source: Your 2nd querys column
    Reset At: Report
    Now create a formula column CF_1 which returns :CS_1 + :CS_2;
    Create a layout field and have the source as :CF_1 and run the report.
    Look this works for me with a simple example on EMP table. If you are not sure on where to place the layout field, then run a default layout (dont select :CS_1 and :CS_2 for display).
    HOPE this works, otherwise send your email id- Ill send an example
    null

  • How do I create a header in the response table for a column I want to use that is not on the form it

    Example: My form has 10 fillable questions.  The Response table uses 10 columns to show the answers to those questions.  I would like to use 3 more columns to record internal information.  How do I insert the header titles?

    Hi,
    You can go to Responses view tab, focus on your last column header and then click menu Table->Add Column After. Or you click + button at the end of table - refer below image.
    I am not clear your question "How do I insert the header titles?" Do you mean you want to use your form title as data value in each cell in the column? If yes, you can set formula in the column following below steps.
    1. Click +Add a Row button
    2. Focus on the cell on column L (I assume you want to set your formular on this column).
    3. Input ="your form title" into the cell
    Then after you received a submission, the form title would display in the related cell in each row.
    Hope it will help you.
    Thanks,
    Ying

  • CO-PA column formula in report painter

    Hi all,
    Sorry about previously explanation!
    In KE34, when define a form, we need several columns with a formula that is a combination between cells.
    Rows:
    - Row 1: Revenue (Y001)
    - Row 2: Total cost (Y002)
    - Row 3:  Wages cost (Y003)
    - Row 4: Depreciation cost (Y004)
    - Row 5: ...
    Columns:
    - Column 1: Plan - value (X001)
    - column 2: Plan - % (X002)= Cost / revenue * 100
                       for example: Cell Z001 (interaction between row 2 and column 2) = Y002/Y001 * 100%
                                             Cell Z002  (interaction between row 3 and column 2) = Y003/Y001 * 100%
    How I can set formula for column 2?
    I tried to define formula for each cell in column 2. It worked, but it takes too much time cause the report includes 3 column like column 2; and about 20 rows -> 3*20 cells need to define for each report like this???
    Is there any tool or formula variable i should  use instead?
    Thanks for any help
    HuyenTT
    Edited by: huyentt4 on May 17, 2010 11:22 AM

    Hi,
    there is no need to define the formula for each cell.
    Mark cell 1/1 (Plan revenue) Have no other cells marked. --> this is cell Z001
    Define column 2 formula as: Column 1 / cell Z001
    The formular will for line X take the plan value from line X and divide it by the plan value from line 1.
    I have lots of reports where I use this
    Regards
    Nikolas

  • Text item validation into Formular.

    hi.
    From some days I have written my fiirst application using Oracle Forms6i.
    In oracle9i I created table USER with column id_user number(5), username varchar2(10) and passwd varchar2(12).
    In oracle forms builder I created the formular with 4 controls(2 fields - username and passwd ,one button to login user and Text item to the botton of this formular to print message for user). In ProperPalette for Text item 'username' and 'passwd' I set adequately Maximum Lenght peperty to 10 and 12(for 'passwd' field) and Required to Yes.
    Then I wanted to make a validation username and passwd fields in this way, that the user can put in 'username' field the string with length between 8 to 10 and for 'passwd' between 8 to 12 and checking all other cases incorrect data entering by login user.
    I created trigger WHEN-MOUSE-CLICK for button with this body:
    declare
         dlug_username number;
         dlug_passwd number;
    begin
         dlug_username := length(:user_data_log.username);
         dlug_passwd := length(:user_data_log.passwd);
         if (:user_data_log.username = NULL and :user_data_log.passwd = NULL) then
              :user_data_log.komunikaty_logowania := 'you didn enter any data!';
         elsif dlug_username >= 8 and dlug_passwd >= 8 then
         :user_data_log.komunikaty_logowania := 'Correct data!';
         elsif dlug_username < 8 or dlug_passwd < 8 then
                   :user_data_log.komunikaty_logowania := 'Fields USERNAME i PASSWD must have more then 8 sign. Correct them!';
                   :user_data_log.username := '';
                   :user_data_log.passwd := '';
         end if;
    exception
         when VALUE_ERROR then
         :user_data_log.komunikaty_logowania := dlug_username;
    end;
    When I run this form by Run Form client/server button, it's not matter what I'll enter in two field 'username', 'passwd', when I press button always is invoke exception section
    but no if condition.
    Now, I don't know what do with this. What is the best way to resolve problems with validation of form elements?
    Thanks in advance for all help, some hints, tutorials. I appologise for so long post, but I
    want directly describe my problem. Thanks.

    Hi,
    Regarding to your post and your problem , obviously the code doesn't go into the
    IF condition and validate it becouse the syntax is not appropriate and every time it goes to the IF it jumps into the exception part. Thats why you have to correct your code as fllowing.
    if (:user_data_log.username IS NULL) and (:user_data_log.passwd IS NULL) then
    etc till the end of the code.
    Kindly if this approach meet your requirment of solving , update your problem with a Subject of Solved
    Regards
    Omar

  • How to calculate key figure before aggregation for complex formular?

    Hi, buddies
    <b>Here's the simplified senario</b>:
    I have a cube, in which the characteristics are 'Calendar Day' and 'Hour' (values are 01~24), and the key figures are stored by day and by hour.
    What I need is very simple, a query to display calculated key figures only by Calendar Day. I don't need Hour information.
    So I create a query: column charact is Calendar Day, rows are several calculated key figures.
    <b>Now the problem is that</b>:
    if I don't put 'Hour' as row in the query, I'll get WRONG result. But if I put 'Hour' as row in the query, I'll get CORRECT result, but all the 'Hour' details will display, which should be hided.
    <b>I know the reason is that</b>:
    the calculated key figure that I create should be calucated before aggregation, not after. But since the formular is pretty complex, I can't change the 'Time of Aggregation Calculation' in key figure's property. (It's greyed out.) So I have to put 'Hour' as row in the query to force calcuation 'before aggregation' in query and set the property 'Calculate Result As...' as 'Summary'.
    <b>My question</b> is:
    whether there's any other way to force calcuation 'before aggregation', so I don't have to put 'Hour' in the query.
    If no, is there a simple way to hide the 'Hour' details and only display summary result ON THE QUERY LEVEL? (
    <i>I can hide detail lines by using web template, or maybe using VB in excel. But I can't use either of them. I want to hide the details on the QUERY LEVEL. So I can use the query directly in any other reporting tools, like Visual Composer.</i>)
    Any idea?
    Wei

    Hi, Sudeepta
    Thanks for your reply.
    I did try to set 'No display' for 'Hour'. The result is that the Characteristics 'Hour' doesn't appear on the query result, but the detailed line of key figures still display on the result. It looks like the followings: (I put summaries on the top/right)
    Date  1/1  1/2  Overall result
    KPI1    10        11   22  (sum line)
    KPI2    20        21   41  (sum line)
    KPI1    12        13   25  (detailed line)
    KPI2    13        13   26  (detailed line)
    KPI1    11        12   23  (detailed line)
    KPI2    12        12   24  (detailed line)
    I want to suppress all the detailed lines and leave sum lines on the result.

  • Report Painter - missing column in GRR1/GRR2 but appears when executed

    Hi
    I have a report with 10 columns in addition to the first column that contains the descriptions of the rows, i.e. Sales Revenue etc etc.  The columns across are different projects. However, most strangely, the first of the projects does not appear when I am in GRR2 or GRR3 but when I execute the report, it is there!!!  When I look at the Overview in GRR2 and GRR3, it is listed so am at a loss to explain where it has gone.
    any suggestions?

    Hello,
    1) hide the first column
    2) unhide the column
    3) you´ll see the column which you were missing instead of the former first column
    4) change the column or whatever you want to do
    5) hide the column
    6) unhide the column
    Now the formular is as it was before. Still you can´t see the column but you know it´s there and you´ll see it in the report.
    I searched a lot and didn´t found any other solution.
    Reg.
    A.S.

  • Urgent: Formular question: get first/last month value with qty value

    We've got a query result as the following:
    Jan_2007 -- Feb_2007 -- Mar_2007 -- Apr_2007
    0 --- 54 --- 0 --- 3
    23 ---0 --- 12 --- 7
    In the above query result,
    1st row shows the sales quantity in Jan_2007 is 0, in Feb_2007 is 54, in Mar_2007 is 0, and in Apr_2007 is 3.
    2nd row shows the sales quantity in Jan_2007 is 23, in Feb_2007 is 0, in Mar_2007 is 12, and in Apr_2007 is 7.
    We would like to add a new column to get the first/last month value with quantity, e.g., in 1st row, the 1st month value with quantity value (>0) is Feb_2007, and the last month value with quantity value (>0) is Apr_2007. Therefore the 1st month value with qty is Feb_2007 and the last month value with qty is Apr_2007. In 2nd row, the first month value with qty is Jan_2007 and the last month value with qty is Apr_2007. But how to use formular to get the 1st/last month values with qty?
    We will give you reward points!

    Hello Kevin,  
    You can create forumula using [Boolean Operator|http://help.sap.com/saphelp_nw04/helpdata/en/23/17f13a2f160f28e10000000a114084/content.htm]
    IF<Logic Expression> THEN <Expression1> ELSE <Expression2> can also be made using a formula in the form
    You can also use the [AND, OR Logical operators |http://help.sap.com/saphelp_nw04/helpdata/en/23/17f13a2f160f28e10000000a114084/content.htm]to check all the keyfigure columns.
    Thanks
    Chandran

  • How to show row data to vertical data(columns) please

    Good Morning,
    Could you please help with this
    I have a table with following two columns
    TechName  Version
    SQLServer 2000
    SQLServer 2003
    SQLServer 2005
    SQLServer 2008
    SQLServer 2008R2
    Oracle    11G
    MSOffice 2000
    MSOffice 2003
    MSOffice 2007
    MSOffice 2010
    How can i show version column this data as vertical component 1 to 5
    TechName Component1 Component2 Component3 Component4   Component5
    SqlServer     2000             2003               2005            
    2008                2008R2
    Oralce          11G              NULL               NULL             
    NULL               NULL
    MSOffice       2000            2003               2007             
    2010                NULL
    Please Help me  with this
    Thank you in Advance
    Asita

    This operation is known as pivoting. The common way to pivot data (transpose rows to columns) in T-SQL is:
    - Grouping (GROUP BY)
    - Spreading values (CASE expression)
    - Aggregating (MIN / MAX / COUNT / etc.)
    Since you have different versions, depending on the value of TechName, then it will be easier if we enumerate each version per value of TechName (row_number in this case).
    with C as (
    select *, row_number() over(partition by TechName order by version) as rn
    from T
    select
        TechName,
        max(case when rn = 1 then Version end) as Component1,
        max(case when rn = 5 then Version end) as Component5
    from
        C
    group by
        TechName;
    If you are going to have more than 5 versions for specific TechName and you do not want to put a quota, then you will have to reach to dynamic sql. Search in this forum by "dynamic pivot" and you will find plenty of examples.
    AMB
    Some guidelines for posting questions...
    AYÚDANOS A AYUDARTE, guía básica de consejos para formular preguntas

  • Formulars with pictures in numbers

    Hello,
    I need help... I´m creating a list with contacts in numbers and I want that when I´m choosing a name from a list that in a different cell automaticly the picture of the person appears. I was trying arround with the look up formulars but it´s not working with pictures.... Who can help me???

    Images cannot be manipulated with formulas, they are the background for the cell. And "choosing a name from a list" has to be done with a checkbox or some other means that can be noticed by a formula, selecting a cell with a mouse click will not cause anything to happen.
    With those two things in mind, you can get the effect you are after. I'll assume a checkbox will be used and it will be in column A, starting at row 2 (i.e., cell A2 of Table 1).
    Create another table for the photos. Use a plain table, no headers. Three columns.
    Cell A1 of your new table will have the formula =Table 1::A2 . Fill this down to the end of the table.
    I recommend you do something similar in column B to copy the persons' last & first names.
    Column C will contain the photos as background images.
    Hide column A.
    Resize the table cells so the photos are the size you want.
    Use Reorganize to set a filter for "show rows where column A is TRUE"
    When you check a checkbox in your table (i.e., select a person), the person's photo and name will show up in the other table.
    I suggested having the name next to the photo so you can more easily put the correct photo for each person in the table. Otherwise it will be difficult to put the photos in the right places.
    I did not hide the column of names so that, if you have selected more than one person, the name appears next to each. You may or may not want that.

  • Eliminating Null After Pivoting the Column

    hello,
    I have a request where we are suppoed to Pivot a columns to Rows, doing so we get nulls. My questions here is  what is the best approach to Pivot and Eliminate Nulls. does anyone came across anything similar?
    ID
    Name
    Typeof   record
    Data1 
    Data   2
    Data3
    1
    John
    Type A
    100
    400
    700
    2
    John
    Type b
    200
    500
    800
    3
    John
    Type c
    300
    600
    900
    4
    Marry
    Type A
    1000
    4000
    7000
    5
    Marry
    Type b
    2000
    5000
    8000
    6
    Marry
    Type c
    3000
    6000
    9000
    To
    ID
    Name
    PersonsData
    Type A
    Type B
    Type C
    1
    John
    Data1
    100
    2
    John
    Data1
    200
    3
    John
    Data1
    300
    1
    John
    Data2
    400
    2
    John
    Data2
    500
    3
    John
    Data2
    600
    1
    John
    Data3
    700
    2
    John
    Data3
    800
    3
    John
    Data3
    900
    4
    Marry
    Data1
    1000
    5
    Marry
    Data1
    2000
    6
    Marry
    Data1
    3000
    4
    Marry
    Data2
    4000
    5
    Marry
    Data2
    5000
    6
    Marry
    Data2
    6000
    4
    Marry
    Data3
    7000
    5
    Marry
    Data3
    8000
    6
    Marry
    Data3
    9000

    How are you doing it?
    Based on what you are showing us, you are unpivoting the [data] columns and pivoting the [type of record]. Then you will need to group by [name] and [person_data] but you will need to get rid of the [id] column because it is represented by the new columns
    derived from [type_of_record] or removing it previous to the pivoting (guessing they are tied (id, type_of_record)).
    DECLARE @T table (
    id int,
    name varchar(35),
    type_of_record varchar(15),
    data1 int,
    data2 int,
    data3 int);
    INSERT INTO @T
    (id, name, type_of_record, data1, data2, data3)
    VALUES
    (1, 'John', 'Type a', 100, 400, 700),
    (2, 'John', 'Type b', 200, 500, 800),
    (3, 'John', 'Type c', 300, 600, 900),
    (4, 'Marry', 'Type a', 1000, 4000, 7000),
    (5, 'Marry', 'Type b', 2000, 5000, 8000),
    (6, 'Marry', 'Type c', 3000, 6000, 9000);
    SELECT
    P.name,
    p.person_data,
    MAX([Type a]) AS [type a],
    MAX([Type b]) AS [type b],
    MAX([Type c]) AS [type c]
    FROM
    @T
    UNPIVOT
    (value FOR person_data IN ([data1], [data2], [data3])) AS U
    PIVOT
    (MAX(value) FOR type_of_record IN ([Type a], [Type b], [Type c])) AS P
    GROUP BY
    P.name,
    p.person_data
    ORDER BY
    P.name,
    p.person_data;
    -- removing column id previous to the pivoting
    WITH R1 AS (
    SELECT
    U.name,
    U.type_of_record,
    U.person_data,
    U.value
    FROM
    @T
    UNPIVOT
    (value FOR person_data IN ([data1], [data2], [data3])) AS U
    SELECT
    P.*
    FROM
    R1
    PIVOT
    (MAX(value) FOR type_of_record IN ([Type a], [Type b], [Type c])) AS P;
    GO
    AMB
    Some guidelines for posting questions...
    AYÚDANOS A AYUDARTE, guía básica de consejos para formular preguntas

  • Block, columns, files or individual cells in numbers?

    Hello,
    There's any way to block from editing an individual cell or file or column?
    Normally I use some cells or columns to use specifyc formulas on them, with  automathic results.
    Not being able to block those, it's really easy to delete the formula.
    I could use a Formular for editing data, and block the full table for showing results, but I would prefer to do it on the smae table as in excel, just having some columns editable and others not blocked with automathic formulas.
    Is this possible somehow?
    Thanks
    Sergi.

    I don't think so, unless maybe your formulas were on a different table on a different sheet and you just referenced them from the data entry table.
    Also, have you looked into Forms? I don't use them much, but I do see that you cannot edit formulas from there.

  • % formular help

    Need help creating a formular if anyone can help thank you in advanced!
    ok so i need a formular that works out 20% of the first 500 and anything over 500 at 10%
    so for instance 612.10 works out as 111.21
    the first 20% of 500 = 100
    the rest over 500 is 112.1 at 10% = 11.21
    Total = 111.21
    hope i have made sence!
    Thanks again

    Rlskin,
    If your input amount is in Column A, you can do that calculation with:
    =IF(A<500, A*0.2, 100+(A-500)*0.1)
    Regards,
    Jerry

  • Re: Column is not getting displayed in the BI report

    Hello Gurus,
    I have developed a BI report with more number of parameters.
    Case 1:
    When i run my report , I am able to see data for particular condition but one column doesn't show any thing. All the rows in the column are blank.
    Case 2
    I tried to put the blank column as parameter, The Program works with out displaying that column data.
    I am not sure where it is going wrong. I tried running the code in toad and i am able to see the data.
    I have checked the code, Parameter description, length, Template and data definition.
    Please help.
    Thanks,
    Sreekanth

    Hi ,
    For that column did u changed any alias name in the query...
    check ur template once by loading the xml data...
    check that column form field that matches with the xml tag or not..
    Thanks,
    Ananth

  • Query help: query to return column that represents multiple rows

    I have a table with a name and location column. The same name can occur multiple times with any arbitrary location, i.e. duplicates are allowed.
    I need a query to find all names that occur in both of two separate locations.
    For example,
    bob usa
    bob mexico
    dot mexico
    dot europe
    hal usa
    hal europe
    sal usa
    sal mexico
    The query in question, if given the locations usa and mexico, would return bob and sal.
    Thanks for any help or advice,
    -=beeky

    How about this?
    SELECT  NAME
    FROM    <LOCATIONS_TABLE>
    WHERE   LOCATION IN ('usa','mexico')
    GROUP BY NAME
    HAVING COUNT(DISTINCT LOCATION) >= 2Results:
    SQL> WITH person_locations AS
      2  (
      3          SELECT 'bob' AS NAME, 'USA' AS LOCATION FROM DUAL UNION ALL
      4          SELECT 'bob' AS NAME, 'Mexico' AS LOCATION FROM DUAL UNION ALL
      5          SELECT 'dot' AS NAME, 'Mexico' AS LOCATION FROM DUAL UNION ALL
      6          SELECT 'dot' AS NAME, 'Europe' AS LOCATION FROM DUAL UNION ALL
      7          SELECT 'hal' AS NAME, 'USA' AS LOCATION FROM DUAL UNION ALL
      8          SELECT 'hal' AS NAME, 'Europe' AS LOCATION FROM DUAL UNION ALL
      9          SELECT 'sal' AS NAME, 'USA' AS LOCATION FROM DUAL UNION ALL
    10          SELECT 'sal' AS NAME, 'Mexico' AS LOCATION FROM DUAL
    11  )
    12  SELECT  NAME
    13  FROM    person_locations
    14  WHERE   LOCATION IN ('USA','Mexico')
    15  GROUP BY NAME
    16  HAVING COUNT(DISTINCT LOCATION) >= 2
    17  /
    NAM
    bob
    salHTH!
    Edited by: Centinul on Oct 15, 2009 2:25 PM
    Added sample results.

Maybe you are looking for

  • Reports on MSS

    hello I want to understand how the standard and customized reports to be configured on MSS Pls let me now ..appreciate for valuable answers...! Vijay

  • Using client_text_io.get_line to get file created date...

    client_text_io.get_line is getting file modified date, is there any way to get the file created date instead? Thanks, Jess

  • Ipod wont come on, tried everything

    I was running and a song would stop halfway through it. I kept pushing play again and it got to be every 10 seconds instead of every minute or so. I finally let it stay paused and my screen never worked during that time. I went home and plugged it in

  • Cross tab column headers display on all pages

    I made a Crystal Report with a cross tab which displays all details. In the cross tab I have 6 columns with details about the data displayed in the last 2 columns. The headers of these columns are only displayed on the first page but not on other pag

  • Color Consistency Across Macs and PCs?

    We have an encoding and creative workflow that is entirely mac/FC Studio base, but authoring is done on a PC. We have run into a very peculiar problem involving color shifting... M2Vs and Still Images (Tiffs) are exported from Motion Projects using C