Calculation for the calculated keyfigure

Hi All,
In Bex Query Desinger , I m creating one new Query based on the data in MultiProvider.
Requirment is :
I have to check the characterisitc values of two different fields in BEx Query Desinger. I have to compare those values.
If the values are same, then i need to calculate change in Volume.
Ex :   Receiving ORG, Supllying ORG, Volume
          AA,XX,20
          AA,YY,30
          BB,AA,10
          CC,AA,6
          DD,BB,4
here  "AA" organisation received 50 PC from XX,and YY and again AA supplied 16 PC to BBB and CC so "Change in Volume" of "AA" is 50-16= 44PC like BB "Change in Volume is 6.
then out put of the query should come as below.
Receiving ORG, Supllying ORG, Volume, Change in Volume
          AA,XX,20,44
          AA,YY,30
          BB,AA,10,6
          CC,AA,6,6
          DD,BB,4,4
Do i have to write ABAP code or BEx variales. I m not sure which one to be used.
Please suggest how to proceed to do this Query output.
Thanks in Advance.
Edited by: WHP123 on Dec 21, 2011 1:51 PM

Hi,
Assuming WORKBOOK is acceptable,
1. Design query to get first output.
2. Create workbook and insert this query.
3. In the workbook you can use excel formulas to achieve desired result. (e.g SUMIF,VLOOKUP etc)
Hope that helps.
Regards
Mr Kapadia
*Assigning points is the way to say thanks.**

Similar Messages

  • Using result of a Calculated Keyfigure as input for a Virtual Keyfigure

    Hi experts,
    is it possible, to use the result of a calculated keyfigure of a query for the input of a virtual keyfigure und use the virtual keyfigure within the same query?
    My problem: depending on drilldown, I have a different percentage within the calculated keyfigure. And depending on that value, I would like to read a score out of a DSO and fill a virtual keyfigure with that, and show the score in the same query. In my opionion, the only way to calculate the score is on the fly, depending on the navigation step I do. Maybe there is another approach that I do not know.
    I was glad for any ideas. Thank you in advance!
    Regards
    F.L.

    Hi,
    Sorry but a calculated key figure result cannot be used in a virtual key figure calculation. The reason purely being that the CKF calculations happen after the Virtual KF/ Char calculations (through BAdI or CMOD).
    The only solution i see here is that you will need to do the calculations in the VKF logic itself. Please do remember that VKF calculations and population happens for each record bein fetched into OLAP from the Infoprovider for the Filters put into the report.
    Hope it helps.
    Thanks,
    Abhishek.

  • Condition for Calculated KeyFigure

    Hi everyone,
                          I need to have an additional Keyfigure based on a Condition. For example, If  Staus is Completed , then I need to take  the Net Price as Allocated Price. And if Status is Incomplete , then I need to fill the Net Price as UnAllocated Price.
    So , in this case , I will have 2 Calculated KeyFigures in the Query Designer. One for Allocated Price and the other for Unallocated Price. But how can I restrict t the values based on Status.
    For Example
    Status            Net Price       Allocated Price      UnAllocated Prcie
    Complete          100                   100                       0
    InComplete        200                   0                          200
    1) Is there any way tht  we can avoid displaying Unallocated Price for Complete Status(Since value will be Zero) and Allocated Price for Incomplete Status
    2)Is it better to have these values calculated in END ROutine in the BackEnd.(But this might affect the performance as I require these values only for this Report and I have more than 2 Reports based on the same InfoProvider)
    Thanks and Regards,
    Samir

    Hi,
    Could you please let us know what will be the value of the status field if it is incomplete. Suppose if you have an EMPTY value if it is not complete, you can use the IF ELSE condition with the Boolean operation in the Calculated Keyfigure or Formula as below,
    (Status ==1)* Unallocated Keyfigure + (Status NOT EQUAL 1)*allocated Keyfigure
    If it is not the case then better to handle it at the routine level. Hope this helps.
    Regards,
    Mani

  • Calculation Of  Maximum for the infoobject.

    Hi all,
    I have requirement in the Bex Query designer as
    5 Columns as below                                    1 Row
    No of open cases                                        Current Assigne.
    No of closed cases.
    Avg age of open cases
    Avg age of closed cases
    Max age of closed cases
    Please help to design query for above scenerio.
    My Data target consists of following chars & key figures.
    Keyfigures
    No of cases
    Age(today-created date)
    chars
    Under Business Partner Dimension I have following Infoobjects.
    Ac Manager
    Current Assigne
    Under   Status Dimension   I have following Infoobjects.
    Latest case Status(In this status are there new open closed).
    last change
    closed reason code.
    Similarly I have another Dimesnsions like
    created on date(created on cal day, created on cal week infoobjects)
    closed on date(closed on cal day, closed on cal week).
    Please help me how to design for  the above requirement.
    Thanks = points.

    Hi,
    Just do this
    1)No of open cases Current Assigne
    Make a RKF on No of cases and restrict it with  "closed on date" = #
    Will give the cases which are not closed. 
    And then make a calculated key figure on this RKF with the function COUNT()
    which is present in the data functions and is the first option.
    it will count all the values which are open.
    2)No of closed cases.
    Make a RKF on No of cases and restrict it with  "closed on date"  != #
    Will give the cases which are closed.
    And then make a calculated key figure on this RKF with the function COUNT()
    which is present in the data functions and is the first option.
    it will count all the values which are closed.
    3)Avg age of open cases:
    This you can acheive by putting the RKF in step 1 and in properties put Calculate result as "Average".
    4)Avg age of closed cases:
    This you can acheive by putting the RKF in step 2 and in properties put Calculate result as "Average".
    5)Max age of closed cases:
    Make two formula variable with the type replacement path each and then in the characteristic option which you get when creating the formula variable give the respective dates one for each of them.
    For this make a formula and subtract these tow formulas variable. calculation "created on date - closed on date".
    Hope it help
    Thanks

  • SSRS 2008 Column Chart with Calculated Series (moving average) "formula error - there are not enough data points for the period" error

    I have a simple column chart grouping on 1 value on the category axis.  For simplicity's sake, we are plotting $ amounts grouping by Month on the category axis.  I right click on the data series and choose "Add calculated series...".  I choose moving average.  I want to move the average over at least 2 periods.
    When I run the report, I get the error "Formula error - there are not enough data points for the period".  The way the report is, I never have a guaranteed number of categories (there could be one or there could be 5).  When there is 2 or more, the chart renders fine, however, when there is only 1 value, instead of suppressing the moving average line, I get that error and the chart shows nothing.
    I don't think this is entirely acceptable for our end users.  At a minimum, I would think the moving average line would be suppressed instead of hiding the entire chart.  Does anyone know of any workarounds or do I have to enter another ms. connect bug/design consideration.
    Thank you,
    Dan

    I was having the same error while trying to plot a moving average across 7 days. The work around I found was rather simple.
    If you right click your report in the solution explorer and select "View Code" it will give you the underlying XML of the report. Find the entry for the value of your calculated series and enter a formula to dynamically create your periods.
    <ChartFormulaParameter Name="Period">
                      <Value>=IIf(Count(Fields!Calls.Value) >= 7 ,7, (Count(Fields!Calls.Value)))</Value>
    </ChartFormulaParameter>
    What I'm doing here is getting the row count of records returned in the chart. If the returned rows are greater than or equal to 7 (The amount of days I want the average) it will set the points to 7. If not, it will set the number to the amount of returned rows. So far this has worked great. I'm probably going to add more code to handle no records returned although in my case that shouldn't happen but, you never know.
    A side note:
    If you open the calculated series properties in the designer, you will notice the number of periods is set to "0". If you change this it will overwrite your custom formula in the XML.

  • Using a "Posting Key" relevant for the calculation of sales

    Hi All,
    if I make a posting by F-02 using a "Posting Key" relevant for the calculation of sales, I wonder: in which table SAP registers the data of sales?
    Is there the way to modify the relevance for sales of that posting?
    Thanks

    Hi
    As far I know, sales figures are getting updated in the following summary tables:
    KCN1 for Customer related.
    LFC1 For Vendor realted.
    Regards

  • MDX calculation based on date logic for the Jan 1 of current year through the 15th of the previous month

    Hello, 
    We need some help with an SSAS MDX query based on date logic. One of the problems is that I don't have access to the Cube but have been given a query example with the logic needed for the calculation. Here's the scenario; 
    The ETL process will run on the first Tuesday after the 15<sup>th</sup> of a given month. The Analysis Cube data queried should include the current year up to the end of the previous month. For example, on May 19<sup>th</sup>
    (the first Tuesday on or after the 15th) the query should include data from January 1<sup>st</sup> through April 30<sup>th</sup>.
    The 15<sup>th</sup> of the month is not part of the query, it is a factor in when the query is run. The query will always be in terms of complete months.
    SELECT
                    NON EMPTY { [Measures].[Revenue Amount],
                    [Measures].[Utilization],
                    [Measures].[AVG Revenue Rate],
                    [Measures].[Actual Hours] }
    ON
                    COLUMNS,
                    NON EMPTY { ([dimConsultant].[User Id TT].[User Id TT].ALLMEMBERS * [dimConsultant].[Full Name].[Full Name].ALLMEMBERS * [dimConsultant].[Employee
    Type].[Employee Type].ALLMEMBERS ) } DIMENSION PROPERTIES MEMBER_CAPTION,
                    MEMBER_UNIQUE_NAME
    ON
                    ROWS
    FROM
                    ( SELECT
    ( { [dimDate].[Week Date].[1/4/2015], [dimDate].[Week Date].[1/11/2015], [dimDate].[Week Date].[1/18/2015], [dimDate].[Week Date].[1/25/2015], [dimDate].[Week Date].[2/1/2015] } )
                    ON
                                    COLUMNS
                    FROM
                                    ( SELECT
    ( { [dimIsBillable].[Is Billable].&[True] } )
                                    ON
    COLUMNS
                                    FROM
    [SSASRBA]
    WHERE
                    ( [dimIsBillable].[Is Billable].&[True], [dimDate].[Week Date].CurrentMember ) CELL PROPERTIES VALUE,
                    BACK_COLOR,
                    FORE_COLOR,
                    FORMATTED_VALUE,
                    FORMAT_STRING,
                    FONT_NAME,
                    FONT_SIZE,
                    FONT_FLAGS

    Hi Hans,
    Thank you for your question.  
    I am trying to involve someone more familiar with this topic for a further look at this issue. Sometime delay might be expected from the job transferring. Your patience is greatly appreciated.  
    Thank you for your understanding and support. 
    Regards,
    Simon Hou
    TechNet Community Support

  • Table for the recorded result.Result automatically calculated using formula

    Hi experts,
              I want to know where this results will be saved(table name) when we use formula in inspection plan.I have marked char.calc in control indicator and formula has been entered in inspection plan.While entering the result when i click on calc button it is displaying correct result and i have saved.when i check the table QAMR,QASR it is not displaying the result for the MIC which i have used formula.I am able to see the formula in QAMV table.When i want to display this result can i retrive the result directly from any of the table or shall i calculate the formula in the program to display?   If i should calculate the formula how to calculate?
    Regards,
    Shwetha.

    Hii,
    If u are using Inspection point for the results recording then results will get stored in QASR table. The manually entered results alone will get stored in the Original_ Input field. Calculated parameters will get stored in the mittelwert field (mean value). Kindly check QASE table for lot without inspection points.
    For ex : Results Field name mean value (1.7500000000E+02)
    with regards,
    K.Lokesh.

  • Is there a standard report for calculation commision for the sales person?

    is there a standard report for calculating commision for the sales person?

    Hi Stephen,
    Use standard tcode IW39.
    In IW39 in section General Data / Administrative Data the is a check box "incl. object list" just tick that box and then give your required input parameters and u can get actual cost and planned cost both equipment wise (provided your input is equipment).

  • Hour rounding for the per diem calculation in Germany

    Dear Experts,
    In Germany the Law for the calculation of the per diem is as below:-
       00 Euros = less than 8 hours
       06 Euros = greater than or equal to 8 hours and < 14 hours
       12 Euros = greater than or equal to 14 hours and < 24 hours
       24 Euros = 24 hours
    I have set up the hour scales in V_T706V as below:-
    Hour              Amount
    7     = 00.00 EUR
    13     = 06.00 EUR
    23     = 12.00 EUR
    24     = 24.00 EUR
    Now system is rounding the partial hour to the next hour, i.e. for 7.50 hours, it is calculating 8 hours and thus per diem as 6 Eur.
    Howeverwe want that for less then 8 hour it should be 0 Eur.
    Please let me know if I am missing any setting, or any other workaround. As this is a legal requirement, we must have to implement it.
    Many thanks,
    Gaurav
    Edited by: gka2707 on Jun 10, 2010 2:28 PM
    Edited by: gka2707 on Jun 10, 2010 2:29 PM
    Edited by: gka2707 on Jun 10, 2010 2:31 PM

    Hi Gaurav,
    It depends upon how you write the coding for the calculation.
    If you want 0 - 7 hrs 59 min = 0 Euros and if it is 8 hrs - 6 Euros.
    Then, you need to say if it is less 7hrs 59 min. or equal to = 0 and if it is 8 or greater than = 6 euros.
    Hope this helps.
    Regards,
    S.Srikanth.

  • Due date calculation for the credit memo with invoice reference.

    Hi,
    When we create the credit memo with reference to invoice, the due date for the credit memo is getting copied from Invoice. In this case if the invoice is due on 31.12.2008 and the credit memo is created on 10.09.2009, then the credit memo due date is appearing as 31.12.2008. It should be 10.09.2009 as per the setting in VOFA billing type customisation in "Credit Memo w/vldt".
    I would like to know how to customise the below requirement.
    If the reference invoice is due after the credit memo creation, the the credit memo should due as per the invoice date.
    If the invoice due is past & then the credit memo due date should be Immediate i.e. Due Immediately.
    Thanks in advance for help.
    Regards,
    Nithin

    I doubt there is such option. From the past projects I do remember that we made a change in the form to print the document date as 'Due Date' for credit memos. Credit memos were paid at once when they were processed and I think that payment term was copied from the original invoice, which made their due date far in future.

  • Pricing procedure for the calculation of VAT

    Dear all,
    We require one new tax structure.
    Assessable value + service tax & VAT for the sum of Assessable value + service tax.
    Kindly give us the pricing procedure for the above requirement.
    Regards
    Mahalingam sarathi

    >
    Mahalingam Sarathi wrote:
    > Dear all,
    >
    > We require one new tax structure.
    >
    > Assessable value + service tax & VAT for the sum of Assessable value + service tax.
    >
    > Kindly give us the pricing procedure for the above requirement.
    >
    > Regards
    >
    > Mahalingam sarathi
    Let me try to fit in this requirement for you (with a small demonstration, you will also have to use the appropriate accounting keys)
    400           assessable value  350 390 
    410 JSRT  Service tax            400
    420 JEC3  ECEss on Srv tax   410
    430 JSE3  Secess on SrvTax 410
    440           ***. val + Srv Tax 400  430
    450 JIVP   VAT                        440

  • Depreciation is not calculating for the first month after go-live

    Hi gurus
    I am trying to calculate depreciation for the first month after going live of the project.
    But system is not posting anything
    I am using AFAB
    Test tun
    But no details
    Even no error messages
    Pls help me to proceed further.
    Reply will be appreciated with full points
    Thanks in advance
    Sneha

    Hi
    Thanks for info
    I tried even with Repeat run and other modes also but vain
    Am able to see the planned amount in Aw01n asset explorer.
    But even now it is not posting But there is no error
    Pls help me
    Thanks in advance
    Sneha

  • Average Calculation for the Dynamically Changing Columns

    Hello Experts,
    We have to design the following scenario in a query in the query designer.
    Variable Selection = 0CALMONTH Range Value
    The Report Data should be as below
    For Example: 0CALMONTH = MONTH1 to MONTH3
    MONTH1--MONTH2--
    MONTH3
    Statistical Forecast %-- A%B%--
    C%
    MAPE--(A%B%C%)/3(A%B%C%)/3--
    (A%B%C%)/3
    For Example: 0CALMONTH = MONTH1 to MONTH5
    MONTH1--MONTH2MONTH3MONTH4--
    MONTH5
    Statistical Forecast %--A%B%C%D%--
    E%
    MAPE--(A%B%C%D%E%)/5(A%B%C%D%E%)/5----(A%B%C%D%E%)/5   .............
    In this report the number of columns will be dynamically changing depending on the 0CALMONTH range value and we need to calculate the MAPE value which is equal to the average value of Statistical Forecast %.
    Can someone please provide me the inputs on how to calculate the MAPE value for the dynamically changing columns.
    Regards,
    AVS Reddy

    Victor,
    I have this code here
    AVG(DESCENDANTS(COSTCENTER.H1.Currentmember,1))
    Working for me right now, without using the second parameter on the AVG function, and 1 for te descendants, and the first decendants of the current acount are not the base level of the hierarchy.
    And if you need to specify the lowest leves to get it to work something is wrong.
    Use the formula above and try optimizing you application.
    Best
    Leandro

  • Sales Order Revenue Calculation for the opening balance

    Hi
    Using SLA tables I wrote the following function to calculate the opening balance for the given period for gieven sales order. The problem is that is is very slow. How do I achieve the same result using the AR Interface Tables?
    CREATE OR REPLACE FUNCTION APPS.REV_OPENING_BAL(period_in varchar2,so_number_in varchar2)
    RETURN NUMBER IS
    rev_open_bal NUMBER:=0;
    BEGIN
    rev_open_bal:= 0;
    SELECT nvl(sum(xdl.UNROUNDED_ACCOUNTED_dr),0) - nvl(sum(xdl.UNROUNDED_ACCOUNTED_cr),0) into rev_open_bal
    FROM gl_code_Combinations c, xla_events xe, xla.xla_transaction_entities xte,
    xla_distribution_links xdl, XLA_AE_LINES xal, xla_ae_headers xah
    WHERE xah.AE_HEADER_ID = xal.AE_HEADER_ID
    AND xal.AE_HEADER_ID = xdl.ae_header_id
    AND xal.AE_LINE_NUM = xdl.ae_line_num
    AND xdl.event_id = xe.event_id
    AND xe.entity_id = xte.entity_id
    AND xe.application_id = xte.application_id
    AND xte.source_application_id = 222
    AND c.code_combination_id = xal.code_combination_id
    AND to_date( period_name, 'MON-RR' ) <= to_date( period_in, 'MON-RR' )
    AND accounting_class_Code in ('REVENUE','UNEARNED_REVENUE')
    and (SELECT interface_header_attribute1
    FROM ra_customer_trx_all
    WHERE customer_trx_id = source_id_int_1) = so_number_in;
    RETURN rev_open_bal;
    EXCEPTION WHEN NO_DATA_FOUND THEN
    rev_open_bal := 0;
    RETURN rev_open_bal;
    END APPS.REV_OPENING_BAL;
    /

    Did you figure this out?
    I am trying to write a report to reconcile the sub-ledgers to GL as part of a conversion from 11 to R12 and would like to be able to dynamically go against the various sub-ledger tables without writing a new script for each sub-ledger.
    Or some easier way.
    Any thoughts on this?
    Thanks,

  • Credit Exposure Calculation for the Customer

    Dear Gurus,
    I wanted to control the credit exposure for the customers based on individual document posting viz. if in case a receipt is posted in the customer account then i would like this to be reflected in his customer account immediately but should be considered for the credit exposure only after a period of 2 days. This is to ensure that the cheque presented by the customer does not gets dishonoured.
    I would like to understand if anyone has come across such scenario and if yes, then what could be the proposed solution.
    Thanks,
    Sanjeev

    You can not set the credit control at material level it is at company code level only and we can give credit limit to customer code wise
    If having any other requirment please let me know about it
    Points if helpfull
    Rg Ajit

Maybe you are looking for

  • Ipod Touch 4G 8GB iOS 4.3.3 wont sync or appear on itunes.

    I have a 4 gen ipod touch 8 GB with iOS 4.3.3 installed previously i believe on iOS 4.3.1 i was able to sync just fine and added new music. Now on iOS 4.3.3 it stops syncing completely but i know my computer detects it because of the sound, im runnin

  • How to transfer video from pc to iphone

    how to transfer video from pc to iphone

  • Always an error when syncing

    I always got an error when Im trying to sync with my apps on my ipod touch. I still have 24GB free space. the errors are: 1. internal device error 2.cannot sync 3. error 48 4.duplicate name help me pls.

  • MAC MINI BLOCKED AND PASS OUT THE OPENING SESSION SCREEN

    Hi, i hope someone can help me. (i'm a french user, so i'll try to write a good english) I've a mac MINI (2006) Intel Core Solo Mac OSX 10.4.11 Tiger I've no problem since some days. I'm not the usual user. Is the problem description : • I start my M

  • Variable Length

    Hi what is the maximum length a string variable can hold? say i want a variable zname to hold a string of 10,000 characters is it posible? kindly advice. if not what is the other way of doing it?