Use Planning Function to calculate new value

Hi All,
I have what seems to be a simple problem, but no success in resolving.
I have 3 planning keyfigures:
-Units
-Price
-Value
The price field is populated from another planning sheet.
The unit field is entered by the user.
The value should be calculated by planning function when button pushed.
I have tried just basic "Value=Units*Price", but always comes back zero.
I have also tried more complex "{Value, CharA, CharB, CharC} = {Units, CharA, CharB...." for each characteristic.  Still zero.
It must be multipling by zero, but not sure how to avoid.
If I put "Value=Price", it works. If I put "Value=Units", it works. If I put "Value=Units+Price", it works.
Please help.
Terrence

A: Use Planning Function to calculate new value

Here is the details.
In the infoprovider the data is like this:
Country/    Product/     Unit Sales/     Price/      Value
DE/             Shirt/            50/                 0/             0
DE/             Shirt/              0/             100.00/        0
The query is display:
Country/    Product/     Unit Sales/     Price/      Value
DE/             Shirt/            50/              100.00/         0
I have tried the following 2 formulas:
Formula 1:
= {Unit Sales} *
Formula 2:
FOREACH Country, Product.
{Value, Country, Product} = {Unit Sales, Country, Product} * {Price, Country, Product}
ENDFOR.
Both return zero for values.
Thanks,
Terrence

Here is the details.
In the infoprovider the data is like this:
Country/    Product/     Unit Sales/     Price/      Value
DE/             Shirt/            50/                 0/             0
DE/             Shirt/              0/             100.00/        0
The query is display:
Country/    Product/     Unit Sales/     Price/      Value
DE/             Shirt/            50/              100.00/         0
I have tried the following 2 formulas:
Formula 1:
= {Unit Sales} *
Formula 2:
FOREACH Country, Product.
{Value, Country, Product} = {Unit Sales, Country, Product} * {Price, Country, Product}
ENDFOR.
Both return zero for values.
Thanks,
Terrence

Similar Messages

  • Input enable query column using Planning function

    Is it possible to input enable a column in query based on user action in Radio button group or button group by calling a planning function or WAD?
    By default the column property for query will be Planning not allowed, but a user action should change the mode to Planning allowed using planning function or entries.
    Thanks

    Hi Ravi,
    you could try to write an exit data slice and a planning function which sets the data slice to not lock the data during runtime. You can find several threads in this forum. how an exit data slice can be used to control the locking of data during runtime.
    Together with the command I mentioned in my last answer this may work, but it still depends on your requirements. A dataslice checks only the combination of characteristics. If you can identiy a characteristic for each column this may work. If not, there is no characteristic combination which can be locked. Please consider this when designing your application. This may lead to an additional characteristic which is used just to identify which column should be locked.
    Hope this helps ...
    Regards Matthias Nutt
    SAP Consulting Switzerland

  • SEM BPS - Planning function to distribute total value over months

    Hello,
    We use SEM BPS. In fact we use the integration of SEM BPS in the CRM opportunity component as opportunity planning.
    Now we want to distribute the total value of certain key figures over the months. Either equal distribution or increasing distribution like 1% increase every month. What would be the best way to do that with a planning function?
    We need to take into account that the number of months depends on the start and end date of the transaction (opportunity).
    Best regards,
    Thomas

    Hi Thomas,
    I would probably create a fox formula, do a foreach in selection loop over the months and distribute the values within that formula.
    If you want to use a standard distribution function, you need to create the reference data somewhere before, which could be a bit difficult if the timeframe changes according to user selections.
    regards
    Cornelia

  • Creating function to calculate average value

    Hi,
    The below query was successfully return an average value. It returned 1 row.
    SELECT AVG(Volume)
    FROM security
    WHERE
    Type = 'Future' AND
    Rating = 'AAA' AND
    Code = 1 AND
    (Day = ''14-mar-09' OR
    Day = '16-mar-09' OR
    Day = '');
    I tried to use that function on my created function below.
    CREATE OR REPLACE FUNCTION fn_Vol_Average
    ( v_DayLast_1_Week IN DATE,
    v_DayLast_2_Week IN DATE,
    v_DayLast_3_Week IN DATE )
    RETURN NUMBER IS
    v_Vol_Average NUMBER;
    BEGIN
    SELECT AVG(Volume) INTO v_Vol_Average
    FROM security
    WHERE
    Type = 'Future' AND
    Rating = 'AAA' AND
    Code = 1 AND
    (Day = v_DayLast_1_Week OR
    Day = v_DayLast_2_Week OR
    Day = v_DayLast_3_Week);
    RETURN NVL(v_Vol_Average, NULL);
    END;
    I called that function by the following query. it was work, however it return the whole rows. It looks like the function perform the average calculation of each rows on the table.
    Can anyone help me what is going on with the logic?
    select fn_Vol_average('14-mar-09','16-mar-09','')
    from security
    --

    But since your function calculates the average over the whole security table, you wouldn't call this from a select statement which also reads the security table.
    You just want to execute it once.
    declare
       l_vol_average number;
    begin
       l_vol_average := fn_Vol_average('14-mar-09','16-mar-09','');
       dbms_output.put_line(l_vol_average);
    end;By the way, be careful with your date parameters. You should use TO_DATE with a proper format mask to prevent conversion errors.

  • How to execute process chains using planning function

    hi, i need to execute process chains from web. i know the steps to that needs to be followed for accomplishing the task.
    1) RSPC_CHAIN_START ( function module) into which process chain has to be passed
    2) create a planning function to invoke the said function module
    3) create a function button on web and assign the planning function.
    Now the thing is how to create the planning function in BPS. plz provide me a solution with steps. And how to pass the process chain into the function module and handle it.
    Thnaks

    Hi Anand
    RSPC_CHAIN_START is the standard function module to run a process chain which i want use. Now, how to use the said FM in planning function to achive my task. Do i need to maintain any parameter in planning function inorder to execute the FM. If you know the solution plz explain in detail.
    I am very new to BPS..bare me plz
    Thank you

  • Using analytical function to calculate concurrency between date range

    Folks,
    I'm trying to use analytical functions to come up with a query that gives me the
    concurrency of jobs executing between a date range.
    For example:
    JOB100 - started at 9AM - stopped at 11AM
    JOB200 - started at 10AM - stopped at 3PM
    JOB300 - started at 12PM - stopped at 2PM
    The query would tell me that JOB1 ran with a concurrency of 2 because JOB1 and JOB2
    were running started and finished within the same time. JOB2 ran with the concurrency
    of 3 because all jobs ran within its start and stop time. The output would look like this.
    JOB START STOP CONCURRENCY
    === ==== ==== =========
    100 9AM 11AM 2
    200 10AM 3PM 3
    300 12PM 2PM 2
    I've been looking at this post, and this one if very similar...
    Analytic functions using window date range
    Here is the sample data..
    CREATE TABLE TEST_JOB
    ( jobid NUMBER,
    created_time DATE,
    start_time DATE,
    stop_time DATE
    insert into TEST_JOB values (100, sysdate -1, to_date('05/04/08 09:00:00','MM/DD/YY hh24:mi:ss'), to_date('05/04/08 11:00:00','MM/DD/YY hh24:mi:ss'));
    insert into TEST_JOB values (200, sysdate -1, to_date('05/04/08 10:00:00','MM/DD/YY hh24:mi:ss'), to_date('05/04/08 13:00:00','MM/DD/YY hh24:mi:ss'));
    insert into TEST_JOB values (300, sysdate -1, to_date('05/04/08 12:00:00','MM/DD/YY hh24:mi:ss'), to_date('05/04/08 14:00:00','MM/DD/YY hh24:mi:ss'));
    select * from test_job;
    JOBID|CREATED_TIME |START_TIME |STOP_TIME
    ----------|--------------|--------------|--------------
    100|05/04/08 09:28|05/04/08 09:00|05/04/08 11:00
    200|05/04/08 09:28|05/04/08 10:00|05/04/08 13:00
    300|05/04/08 09:28|05/04/08 12:00|05/04/08 14:00
    Any help with this query would be greatly appreciated.
    thanks.
    -peter

    after some checking the model rule wasn't working exactly as expected.
    I believe it's working right now. I'm posting a self-contained example for completeness sake.I use 2 functions to convert back and forth between epoch unix timestamps, so
    I'll post them here as well.
    Like I said I think this works okay, but any feedback is always appreciated.
    -peter
    CREATE OR REPLACE FUNCTION date_to_epoch(p_dateval IN DATE)
    RETURN NUMBER
    AS
    BEGIN
    return (p_dateval - to_date('01/01/1970','MM/DD/YYYY')) * (24 * 3600);
    END;
    CREATE OR REPLACE FUNCTION epoch_to_date (p_epochval IN NUMBER DEFAULT 0)
    RETURN DATE
    AS
    BEGIN
    return to_date('01/01/1970','MM/DD/YYYY') + (( p_epochval) / (24 * 3600));
    END;
    DROP TABLE TEST_MODEL3 purge;
    CREATE TABLE TEST_MODEL3
    ( jobid NUMBER,
    start_time NUMBER,
    end_time NUMBER);
    insert into TEST_MODEL3
    VALUES (300,date_to_epoch(to_date('05/07/2008 10:00','MM/DD/YYYY hh24:mi')),
    date_to_epoch(to_date('05/07/2008 19:00','MM/DD/YYYY hh24:mi')));
    insert into TEST_MODEL3
    VALUES (200,date_to_epoch(to_date('05/07/2008 09:00','MM/DD/YYYY hh24:mi')),
    date_to_epoch(to_date('05/07/2008 12:00','MM/DD/YYYY hh24:mi')));
    insert into TEST_MODEL3
    VALUES (400,date_to_epoch(to_date('05/07/2008 10:00','MM/DD/YYYY hh24:mi')),
    date_to_epoch(to_date('05/07/2008 14:00','MM/DD/YYYY hh24:mi')));
    insert into TEST_MODEL3
    VALUES (500,date_to_epoch(to_date('05/07/2008 11:00','MM/DD/YYYY hh24:mi')),
    date_to_epoch(to_date('05/07/2008 16:00','MM/DD/YYYY hh24:mi')));
    insert into TEST_MODEL3
    VALUES (600,date_to_epoch(to_date('05/07/2008 15:00','MM/DD/YYYY hh24:mi')),
    date_to_epoch(to_date('05/07/2008 22:00','MM/DD/YYYY hh24:mi')));
    insert into TEST_MODEL3
    VALUES (100,date_to_epoch(to_date('05/07/2008 09:00','MM/DD/YYYY hh24:mi')),
    date_to_epoch(to_date('05/07/2008 23:00','MM/DD/YYYY hh24:mi')));
    commit;
    SELECT jobid,
    epoch_to_date(start_time)start_time,
    epoch_to_date(end_time)end_time,
    n concurrency
    FROM TEST_MODEL3
    MODEL
    DIMENSION BY (start_time,end_time)
    MEASURES (jobid,0 n)
    (n[any,any]=
    count(*)[start_time<= cv(start_time),end_time>=cv(start_time)]+
    count(*)[start_time > cv(start_time) and start_time <= cv(end_time), end_time >= cv(start_time)]
    ORDER BY start_time;
    The results look like this:
    JOBID|START_TIME|END_TIME |CONCURRENCY
    ----------|---------------|--------------|-------------------
    100|05/07/08 09:00|05/07/08 23:00| 6
    200|05/07/08 09:00|05/07/08 12:00| 5
    300|05/07/08 10:00|05/07/08 19:00| 6
    400|05/07/08 10:00|05/07/08 14:00| 5
    500|05/07/08 11:00|05/07/08 16:00| 6
    600|05/07/08 15:00|05/07/08 22:00| 4

  • Using Javascript function to change the value of a request variable

    Have a javascript function that activates onchange within a form variable. Would like the javascript function to change the value of a request variable.
    The javascript function is able to obtain the current value of the request variable ( which is 0 ) however I am unsuccessful in changing the value to 1.
    I have been trying to use the following:
         var vchange = 'request.changes_made = 1 ;' ;
         eval(vchange);
    Any ideas?

    If the user makes a change to the content of the form, and then attempts to leave the form, a javascript alert pops up giving the user the option of cancelling the submit, returning to the form and saving it.
    If there have been no changes, then the user is free to migrate to another page.
    This process is to protect users from losing valuable information but not to annoy them with "R U Sure" messages.
    Knowing the status of the form content is important to the functionality of the application.
    G

  • Difficulty in creating a chart by using a function with a returned value

    Hi,
    I am having a problem in using own function to create chart a with a returned value as the chart. If not using the returned value, it works fine.
    Is this a known issue?

    If you share some code, we might be able to help you.

  • Divide key figures in real time cube by using planning function

    Dear all,
    I have a real time cube which contains one key figure which is defined by 10 characteristics.
    For one country, the users types the values fpr the key figure in a wrong format, so I have to divide those values by 1000.
    I have tried to do this with a planning function "Revaluating" and a filter (on this spec. country). I have combined this two element in a planning sequence. When I run this I just get the error message "planning function ended with errors" without any further information.
    Is there an other way to devide values within the cube? the BI release is 7.0.
    Any help would be great.
    Best regards,
    Stefan from Munich/Germany

    Hi Stefanos,
    What you are doing is absolutely right.. However, I want to ask a few question..
    1. Are the characterestic values included in the filter ? ie. If you want to change for Country: UK, is UK present in filter?
    2. Are there any other characteristics that you have not included in the function and are getting changed by chance ? Like you might need to include 0fiscyer in To Change if you are assigning 0Fiscper.
    3. Write a small FOX function with hardcoded values to check if the system is accepting the values or not..
    It should work.. Please write back in case you need more help..
    Regards, Rishi

  • Awful performance when using planning function of type EXIT

    Hi.
    I created planning function base on my own class with interface IF_RSPLFA_SRVTYPE_IMP_EXEC_REF.
    In this class I read active buffer and do some validations.If validation not successful I give error message, otherwise I do nothing.
    After my method ends to run (very fast and without any problem and only on active filter rstricted values) it seem that application goes forward, come to method EXECUTE_SERVICE in CL_RSPLFR_CONTROLLER==========CM002 (see code below) and at line 387 when calling read_data_from_buffer it hangs for 10 minutes.
    I seems that system try to read all data in cube (not only restricted with active filter) and hangs. This method returns me all records of cube into L_R_REF_DATA.
              IF n_use_node_selection = rs_c_false.
                read_data_from_buffer( EXPORTING i_t_charsel = l_t_charsel_ref
                                                 i_t_charsel_orig = l_t_charsel_orig
                                                 i_tsx_seldr_orig = p_tsx_seldr
                                                 i_th_block_chars = l_th_ref_block_chars
                                                 i_enqmode = 'S'
                                                 i_th_attr = l_th_attr
                                       CHANGING c_r_data = l_r_ref_data
                                                c_r_sid = l_r_th_sid
                                                c_ok = l_ok ).
              ELSE.
    Does anybody has an idea WHY ???
    Regards.

    Solved.
    I just need to fill E_T_REF_CHARSEL at end of my class run.

  • How can I use SUM function to calculate # of employees in the comp.&deptnt?

    I've got two tables: employee & department. I am trying to calculate total employees by department and total employees by the entire company. I know I need to use SUM function, but I only can calculate total employees by department & by company separately. I need to get this output:
    DEPT_NAME     DEPT_TOTAL_SALARY         COMPANY_TOTAL_SALARY
    RESEARCH                  10875                        29025
    SALES                      9400                        29025   
    ACCOUNTING                 8750                        29025     
    This is my code:
    SELECT department_name, SUM(salary) as total_salary
    FROM employee, department
    WHERE employee.department_id = department.department_id
    GROUP BY department_name;
    SELECT SUM(salary)
    FROM employee;
    Can somebody help please?
    Thank you in advance.Edited by: user13675672 on Jan 30, 2011 2:29 PM
    Edited by: user13675672 on Jan 30, 2011 2:31 PM

    Hi, Peter
    Peter Gjelstrup wrote:
    ... There might be a smarter way, with no re-select.You're right, as usual.
    SELECT       d.dname
    ,       SUM (e.sal)               AS dept_tot_sal
    ,       SUM (SUM (e.sal)) OVER ()     AS comp_tot_sal
    FROM       scott.dept     d
    JOIN       scott.emp     e  ON     d.deptno     = e.deptno
    GROUP BY  d.dname
    ;Analytic functions are computed after aggregate functions, so an aggregate function can be nested inside an analytic function.
    Another way (without a sub-query, at least) would be SELECT DISTINCT, with only analytic functions.
    SELECT DISTINCT
           d.dname
    ,       SUM (e.sal) OVER (PARTITION BY  d.dname)     AS dept_tot_sal
    ,       SUM (e.sal) OVER ()                    AS comp_tot_sal
    FROM       scott.dept     d
    JOIN       scott.emp     e  ON     d.deptno     = e.deptno
    ;

  • Recursive query to calculate new value in a table.

    Hello folks,
    I have following data.
    drop table transactions;
    create table transactions
    ( ac varchar2(10), rec_seq int, tr_ref int, action varchar2(100), qty int );
    select * from transactions;
    insert into transactions values ('A1', 1, null, 'BUY', 1);
    insert into transactions values ('A1', 2, null, 'BUY', 4);
    insert into transactions values ('A1', 3, 1, 'TR to A2', -2);
    insert into transactions values ('A1', 4, null, 'SELL', -1);
    insert into transactions values ('A1', 5, 2, 'TR from A2', 2);
    insert into transactions values ('A1', 6, null, 'BUY', 5);
    insert into transactions values ('A1', 3, 3, 'TR to A3', -1);
    insert into transactions values ('A2', 1, null, 'BUY', 5);
    insert into transactions values ('A2', 2, null, 'BUY', 5);
    insert into transactions values ('A2', 3, null, 'BUY', 5);
    insert into transactions values ('A2', 4, 1, 'TR from A1', 2);
    insert into transactions values ('A2', 5, null, 'SELL', 2);
    insert into transactions values ('A2', 6, null, 'BUY', 1);
    insert into transactions values ('A2', 7, null, 'BUY', 1);
    insert into transactions values ('A2', 8, 2, 'TR to A1', -2);
    insert into transactions values ('A2', 9, null, 'sell', 3);
    insert into transactions values ('A2', 10, 4, 'TR from A3', 3);
    insert into transactions values ('A3', 1, null, 'BUY', 5);
    insert into transactions values ('A3', 2, 3, 'TR from A1', 1);
    insert into transactions values ('A3', 3, null, 'SELL', 2);
    insert into transactions values ('A3', 4, 4, 'TR to A2', -3);I the transactions table that holds the activity took place in a time. Below is some description of the table.
    1. rec_seq is the unique for each row within each AC value
    2. action column holds the nature of the activity
    3. tr_ref holds to link between the transfers. That is, source and destination of the transfers can be matched using this column.
    Now I want to write a query such that It returns the whole table with value of rec_seq changed in a recursive fashion that is
    1. Compare transfer records using tr_ref.
    2. Assign the greatest rec_seq to both the records.
    3. Recalculate the rec_seq of the following records from the new value. This recalculation to happen in a recursive fashion.
    Any hint/partial or full assistance in this will immensely help.
    Thank you.
    Girish

    Hi,
    Transfers are the key events in this problem. Every time there is a transfer, the new rec_seq number has to be adjusted. The new rec_seq value will be the greater of two numbers:
    (1) the req_seq of the last transfer in this ac, plus the number of other transactions in this ac since then, and
    (2) the req_seq of the last transfer in the other ac, plus the number of other transactions in that ac since then.
    (I assume a transfer always involves two different ac's. If not, the query below can be changed.)
    One way to approach this problem is to think of a directed graph, where every node is a transfer row, and it may have up to two parents:
    (1) the previous transfer in the same ac
    (2) the previous transfer in the other ac
    The query below constructs such a graph, then finds all the paths through that graph (in the sub-query named graph). It finds the longest path to each node (weighted by the number of rows between transactions). The main query references that number, and assigns consectuive new_rec_seqs starting with it.
    WITH     got_trs  AS
         SELECT     ac, rec_seq, tr_ref, action, qTy
         ,     LAST_VALUE (tr_ref IGNORE NULLS)  OVER ( PARTITION BY  ac
                                                           ORDER BY      rec_seq
                                            ROWS BETWEEN  UNBOUNDED PRECEDING
                                             AND  1            PRECEDING
                                           )        AS prev_tr
         ,       LAST_VALUE (tr_ref IGNORE NULLS)  OVER ( PARTITION BY  ac
                                                           ORDER BY      rec_seq     DESC
                                                 )        AS next_tr
         FROM    transactions
    --     WHERE     ...     -- if you need any filtering, put it here
    ,     got_tr_cnt     AS
         SELECT     got_trs.*
         ,     COUNT (*) OVER ( PARTITION BY  ac
                                  ,            next_tr
                          )    AS tr_cnt
         FROM    got_trs
    ,     nodes     AS
         SELECT     ac
         ,     tr_ref
         ,     tr_cnt
         ,     ac          AS parent_ac
         ,     prev_tr          AS parent_tr
         FROM     got_tr_cnt
         WHERE     tr_ref     IS NOT NULL
        UNION
         SELECT     s.ac
         ,     s.tr_ref
         ,     o.tr_cnt
         ,     o.ac          AS parent_ac
         ,     o.prev_tr     AS parent_tr
         FROM     got_tr_cnt     s
         JOIN     got_tr_cnt      o  ON     s.tr_ref     = o.tr_ref
                           AND     s.ac          != o.ac
         WHERE     o.prev_tr        IS NOT NULL
    ,     graph     AS
         SELECT     tr_ref
         ,     MAX ( LENGTH ( REPLACE ( SYS_CONNECT_BY_PATH ( LPAD ('.', tr_cnt, '.')
                    )     AS start_pt
         FROM     nodes
         START WITH     parent_tr     IS NULL
         CONNECT BY     parent_tr     = PRIOR tr_ref
              AND     parent_ac     = PRIOR ac
         GROUP BY     tr_ref
    SELECT       t.ac
    ,       t.rec_seq
    ,       t.tr_ref
    ,       t.action
    ,       t.qty
    ,       NVL ( g.start_pt
               , 1
               ) + ROW_NUMBER () OVER ( PARTITION BY  ac
                                            ,          NVL ( t.tr_ref
                                                    , t.prev_tr
                                            ORDER BY          rec_seq
              - 1     AS new_rec_seq
    FROM           got_trs  t
    LEFT OUTER JOIN      graph       g  ON  g.tr_ref     = NVL ( t.tr_ref
                                                       , t.prev_tr
    ORDER BY  t.ac
    ,            t.rec_seq
    ;Output:
    AC    REC_SEQ TR_REF ACTION     QTY NEW_REC_SEQ
    A1          1        BUY          1           1
    A1          2        BUY          4           2
    A1          3      1 TR to A2    -2           4
    A1          4        SELL        -1           5
    A1          5      2 TR from A2   2           8
    A1          6        BUY          5           9
    A1          7      3 TR to A3    -1          10
    A2          1        BUY          5           1
    A2          2        BUY          5           2
    A2          3        BUY          5           3
    A2          4      1 TR from A1   2           4
    A2          5        SELL         2           5
    A2          6        BUY          1           6
    A2          7        BUY          1           7
    A2          8      2 TR to A1    -2           8
    A2          9        sell         3           9
    A2         10      4 TR from A3   3          12
    A3          1        BUY          5           1
    A3          2      3 TR from A1   1          10
    A3          3        SELL         2          11
    A3          4      4 TR to A2    -3          12I don't recommend trying to store this number in the table; it will be a nightmare trying to keep it up to date. However, if you do want to store it in the table, you can use something like the query above in a MERGE statement.
    When trying to understnad any quiery that uses sub-queries, it can be helpful to run the individual sub-queries by themselves, and study the output.

  • Read data in InfoCube using Planning Function

    Hi Expert,
    someone know the appropriate FMs for reading data in an infocube and provide data, from the same infocube, to the bps cube using FM-Init and FM-Exit in a planning Function?
    Many Thanks in advance
    Fabio

    You could try to use FM RSDRI_INFOPROV_READ: it will give you back the data in E_T_DATA.
    Hope it helps
    Regards

  • Using extract function to reterieve tag value of XMLTYPE

    Hi,
    I have table called DICOM_ARCHIVE,in whch metadata is a column of type XMLTYPE,now to reterive specific tag values from this column i use QUERY-1
    QUERY-1
    SELECT id,
    to_date(substr(a.metadata.extract('//DATE/text()').getStringVal(),1,10),'yyyy-mm-dd')
    AS "Study Date"
    FROM dicom_archive a
    order by id
    this reterives the date values for the tag "DATE" ,but if i dont prefix the table alias before the extract coulm (ie before metadata) i get ora-00904 error
    See below
    SELECT id,
    to_date(substr(metadata.extract('//DATE/text()').getStringVal(),1,10),'yyyy-mm-dd')
    AS "Study Date"
    FROM dicom_archive a
    order by id
    For this query i get ora-00904.
    Any help on this

    I presume you are using the Oracle Multimedia DICOM feature. If so, you might find the forum at Multimedia (formerly interMedia) useful.

  • Use Aggregate function to calculate a DIFFERENCE.

    I am trying to calculate a Forecast Variance "VR" from my Cube.  I have Daily Transaction and Forecast [Rec Type] (Record Types) coded "GL" (General Ledger or Sales), "FC" (Forecast) for all Products.  I created a
    new MEMBER "VR" (Variance) as shown below.  This produces the SUM(Aggregate) of "GL" and "FC".  What I need is the DIFFERENCE.  I tried placing a (-1) in my formula.  It passed the syntax check but does not
    produce any "VR" results.  Any suggestions would be appreciated.  Here is my Script View:
    Thanks!
    CALCULATE;                   
    CREATE MEMBER CURRENTCUBE.[Measures].[SalesMTD]
     AS SUM(MTD([Dates].[Year -  Quarter -  Month -  Date].CurrentMember), [Measures].[Prime Qty]),
    FORMAT_STRING = "#,##0;-#,##0",
    NON_EMPTY_BEHAVIOR = { [Prime Qty] },
    VISIBLE = 1 ,  ASSOCIATED_MEASURE_GROUP = 'PSI Activity';   
    CREATE MEMBER CURRENTCUBE.[PSI Activity].[Rec Type].[All].[VR]
     AS Aggregate(
       ([PSI Activity].[Rec Type].[FC]),
       ([PSI Activity].[Rec Type].[GL])
      }, [Measures].CurrentMember
    FORMAT_STRING = "#,##0;-#,##0",
    NON_EMPTY_BEHAVIOR = { [Prime Qty] },
    VISIBLE = 1 ,  ASSOCIATED_MEASURE_GROUP = 'PSI Activity'  ;
    Mario

    TRy the below query.Wont it give the expected result?
    CREATE MEMBER CURRENTCUBE.[PSI Activity].[Rec Type].[All].[VR]
     AS (
       ([PSI Activity].[Rec Type].[FC],[Measures].CurrentMember)-
       ([PSI Activity].[Rec Type].[GL],[Measures].CurrentMember)
    FORMAT_STRING = "#,##0;-#,##0", 
    NON_EMPTY_BEHAVIOR = { [Prime Qty] }, 
    VISIBLE = 1 ,  ASSOCIATED_MEASURE_GROUP = 'PSI Activity'  ;

Maybe you are looking for

  • HTML emails with attachments

    When I compose an html email (ie: using the float left alignment on a picture) and add an attachment(word doc), the formatting is lost on the recipient's end. In fact usually, the body of the message is blank and the pictures, html file, and original

  • Can the camera reference in a file be changed?

    The file metadata show the correct camera but the file is located under" unknown camera"? In one case I  shot 90 fotos with the same camera (nikon d1x) same date, same place and 85 are correctly placed - 5 not! Since I have a backup folder that is ba

  • Open Target Quantity  of a Conrtact - ME21N

    How can we see the Open Target Quantity in ME21N while creating a PO in reference to a Contract? In ME21 while creating in reference to a Contract , system clearly shows what is the Open Target Quantity. Is there a way in ME21N? I tried changing the

  • Failing - SQL Server Patch Installation

    Hi Team: We are trying to install SQL Server Patch --> SQL Server 2012 SP1 CU3 --> KB2812412 but it is failing with the below issue (error message find in screen shot) Our Database Engine is running with --> SQL Server 11.0.3350 SSAS is running with

  • I need a 64 bit installer to download itunes 10.6 properly?  How do I get it?? Help...

    need a 64 bit installer to download itunes 10.6 properly?  How do I get it?? Help...