Need to perform calculations on a specific characteristic in a BeX query

Hi,
I have a requirement to perform calculations based on Characters.
The data that is currently displayed in the report.
   Date              User               Activity                A        B
04/24/2014       BR3TXA         PTWY                 10        12
04/24/2014       BR3TXA         CLX1                  25        04
04/24/2014       YEXM035       NOWE               14        15
04/24/2014       YAXP134        DONQ                08       05   
04/24/2014       YRST112        PTWY                12       05
If Activity is PTWY, then A should be A * B = A. For the rest of the activity type, the value in A should be the same.
The result should display as Below:
  Date                  User               Activity                A        B
04/24/2014       BR3TXA         PTWY                 120     12
04/24/2014       BR3TXA         CLX1                  25        04
04/24/2014       YEXM035       NOWE               14        15
04/24/2014       YAXP134        DONQ                08       05   
04/24/2014       YRST112        PTWY                60       05
Is there a way out in IF, THEN, ELSE statements. Or Customer Exit variable with Code in CMOD would work?

This can be achieved just with the help of two simple selections or RKF.
Restrict the KF A with the activity = PTWY--Lets call this RKF1..Now this will populate value against PWTY only.
Create another Restricted KF--with A--This time Exclude value = PWTY--This will populate values against activity other than PWTY...Lets name it RKF2.
Now create a new formula say F1 = (RKF1*B)--Multiply RKF1 with B keyfigure.
Now the final formula say F2 = (F1+RKF2)--This will give the desired result.
Hide the other objects.
Regards,
AL

Similar Messages

  • VOFM  rounding issue need to perform calculations till only 2 decimals

    Hello  All,
    In Sales order the price calculations are  being performed till 4 decimal places but we want to restrict till 2 decimal only .  Providing example
    Suppose Price  is  2 USD .   Add 4.6%  for adjustment ,  this will become  2.092  ( for qty 1 ).   Now  in column Amount in condition tab of sales Order I can see value as 2.09  .  
    The Quantiy for an Sales order item is 10 .  SAP multiples 2.092  with 10  and we get 20.92 .   
    If we use value 2.09  and multiple it by 10 we will get 20.90 .     Here we can see difference in amount  by 2 cents. 
    We need to restrict calculation upto 2 decimals ( 2.09 )  and  this shld be multiplied with 10 .   Please  guide me in detail on routine if any which we can use for this , how to write logic in this routine , do we need to use Exit ? .
    Thanks a lot .
    Sujit .

    Hi Sujit,
    use  WRITE A TO B 2 DECIMALS.
    Thanks,
    Naresh.

  • Issue with Free Characteristic filtering in BEx Query

    We are using Cost Center hierarchy as a free characteristic in the report and when the user tries to apply a filter for selecting a particular cost center, we are able to see both the Key and Text.  But after the query applies the filter and if we go back to change the filter from one cost center to the other, we are not able to see the Text of the cost center.  It is just displaying the cost center number.  The only way we can get the text back is by refreshing the query.  Any suggestions on how to avoid this problem?
    Thanks
    Madhav Nanduri

    I tested couple of other reports where the cost center hierarchy is created as a free characteristic and the problem is appearing in all the queries.
    Thanks,
    Madhav Nanduri

  • How to get the value from textInput Component to perform calculation?

    I need some help here...I'm trying to get the value of user input from the TextInput Component which is the age, height and weight to calculate the bmr and display the result in member("result").text.
    How am i suppose to let the integer pass through in order for me to perform calculation? Would appreciate if anyone can help me out with this, thanks!
    Below are the formula :
    The Harris Benedict equation estimates BMR:
    For women: (9.56 x w) + (1.85 x h) – (4.68 x a) + 655
    For men: (13.75 x w) + (5 x h) – (6.76 x a) + 66

    Assumed that this section is only for male ...it still show error saying script error : String expected for
    on mouseDown
       member("result").text = (13.75 * value(member("weightText").text)) + (5 * value(member("heightText").text)) - (6.76 * value(member("ageText").text)) + 66
    end
    Do i have to add in "put sprite(x).text -- where x is the number of the sprite that is the text input." ?

  • Performing ranking calculations with the BEx Query Designer - ideas?

    I have a scenario where I have a key figure with raw values.  In the column beside this I want to rank the key figures by their raw values.
    Something like this:
    Amount      Rank
       0.11           2
       0.05           3
       0.22           1
       0.03           4
    I can do this no problem using the "Calculate Single Values as:" Ranked List.
    For subsequent calculations I need to perform mathematical operations on the RANK column.    For example say I want to make a 3rd column where I divide the rank by 2:
    Amount      Rank     Rank by 2
       0.11           2             1
       0.05           3            1.5
       0.22           1            0.5
       0.03           4             2
    I cannot figure out how to do this as SAP does not really STORE the values of the rank column for my next calculation.  The "Rank by 2" column actually shows this:
    Rank by 2
        0.065
        0.0025
         0.11
        0.015
    which is dividing the original amount by 2 and not the actual RANK value.
    Anyone have some suggestions on what I can do?

    I know what you are talking about, it will always return 1 or zero which is true or false, I don't think you can do anything much to this. Since, the value of Ranked is getting calculated at runtime.
    thanks.
    Wond

  • How to performing calculations at workbook level using using VB / macros et

    HI All,
    I want to know about how to perform calculations at the work book level using VB/Macros..
    Request provide me links related to this .
    Manyt hanks in advance.

    Hi,
    Open the Excel workbook and press ALT + F11. VB editor opens and you can write your piece of code and name it as Auto_open if you need that macro to automatically run when you open excel.
    Second option is record macro, which will record the calculation and then call this macro everytime you need.
    Thanks,
    Tintu

  • BEx query needs to count unique characteristic values

    Is there any way to build a query using BEx query designer to count the number of unique values of a characteristic.  For instance, my cube has detailed transactions for claim information.  Each claim number can have multiple products.  My query need to show the number of claims that exist for each product.  I don't want the detail of the claim number, just how many claims exist.
    Product          Gross Paid Loss        Claim Count
    Total Auto                $ 43,865.01              ?
    Total Property  $ 4,068,321.57              ?
    Not assigned                19,426

    Hi,
    Creat calculated  keyfigure with data functions Count value and save with technical name.
    Right click on that go to propertes, select count with exception aggregation - Claim Number,
    also use after aggregation and decimal places '0'.
    Regards
    Malyadri

  • Yearly once inspection for specific characteristic with out inspec. lot

    Hi Experts,
                        My client want some specific characteristic inspection yearly once with out inspection lot.
    help me how to map this scenario
    Regards,
    Sbabu
    Edited by: sbabu babu on Apr 22, 2010 12:27 PM

    I dont think any standard solution for this,
    few suggestions are
    Go for a manual lot, client can track manual lot generation based on a report. report can be ABAP deveoped based on the client requirements. So every day client can run report and know which all materials are to be inspected on that day. I feel this as best.
    DMR may have an issue as unnecessarily lot will get generated throughout the year in system. Its OK, we can do auto UD and all, but think do we really need these data go into system for rest 364 days for that one day inspection. If you ask me, I will say no to it.
    Calibration lots can be generated only for equipments. Its only fixed time based inspection lot. But here material need to be maintained as equipment. i dont think, this is acceptable. Try first one which worked out well for me. Jus a report for tracking.
    Thanks
    Vineeth Varghese

  • WAD Help:  Need for one dropdown to control two characteristic InfoObjects

    All,
    I have a dashboard built in WAD that contains several charts.  There are several data providers and I have created a few simple dropdowns to apply filters.  Here lies my problem: 
    For one specific characteristic, "business unit", in one data provider the InfoObject is "0material_zgbu"(nav attribute of 0material).  In another data provider, the InfoObject is "0prft_ctr_zgbu" (nav attribute of 0prft_ctr).
    What is the best way to make the dropdown selection apply a filter to both characteristics?  Can I force a dropdown to control two characteristics?
    Should I create a hidden dropdown to control the 2nd and somehow pass the selected value to it using code?
    Any help or advice will be greatly appreciated.
    Thanks
    Rodney
    (fyi.... I am using version 2004s)

    If you feel both Drop Down Boxes will have Same values... then you can display only one Drop Down Box. Once you select any Value, you can trigger a command which will display values for both Data Providers.
    Let me know if you need any further explanation.
    Note: this will work only if both Drop Down Boxes has same Charecterstics Values.
    Nagesh Ganisetti.
    Assign points if it helps.

  • Need to determine data type of free characteristic in multiprovider

    Hi,
    I need to determine the data type (e.g. numeric vs alpha numberic) of a free characteristic in a multiprovider.  Can this be accomplished in BEx Query Designer? 
    If not, can it be accomplished in RSA1?  How?
    Thanks,
    Kevin

    its not possible via Query designer..
    give that object name if it is infoobject then you can get via RSD1

  • Last Year Inovice Total need to be calculated in a new column in OBIEE 11g

    Hi,
    I have a measure Net Invoiced Amount, and now my client is asking to get a new column in which last year's Net Invoiced Amount total needs to be calculated.
    We need to select the Dates dynamically, it is 2012, so the column should the invoiced amount total for 2011, if it is 2013 then amount should be 2012. Can we do this in RPD. If so, please tell me how.

    Hi,
    Method1:
    TIMESTAMPADD( SQL_TSI_DAY , -1, TIMESTAMPADD( SQL_TSI_DAY , EXTRACT( DAY_OF_YEAR FROM DATE Column) * -(1) + 1,
    DATE Column))
    Note: create alias table from your fact (call it as fact table name_YTD) Join th aliases to the dimension tables exactly like how your normal fact table is joined to the aliases, except for the time dimension.
    Method 2: by using Time series functions (Ago fxn)
    Ago(<<Measure>>, <<Level>>, <<Number of Periods>>)
    Example:Ago("Human Resources"."Fact - Absence"."# Days" , "Human Resources"."Time"."Year" , 1)
    Method 3: if your using obiee11g --> from analysis itself you cand solve it
    AGO(expr, [time_level], offset)
    Thanks
    Deva

  • Need to send notification to a specific person based on condition

    Please help.
    I need to send notification to a specific person based on condition. When a specific hold is placed on an invoice, send a notification to the Buyer who is referenced on the Purchase Order that is associated with that invoice. It will be an FYI notification.
    I'm looking at APINVHDN AP Hold Maiin Process. I thought possibly adding a notification into the "No" condition after the GET_APPROVER function since there would not be an approver on the invoice since it's on hold.
    Any ideas would be very much appreciated.

    Try the LiveCycle Designer forum.

  • I want to use a mac mini as a server supporting storage. Can I pair my macair to it for when I need to perform updates and maintenance ?

    I want to use a mac mini as a server supporting storage. I have other devices such as an iMac and iPad that will access information from the server. I do not want to purchase a monitor and keyboard as the unit will sit in a cupboard out of sight. Can I pair my macair to it for when I need to perform updates and maintenance ?

    I have a 2010 Mac Mini running Yosemite and Server which I use
    as a headless home server.
    I have is set up to allow screen sharing and can connect to it and
    control it with my iMac, Macbook Pro, iPhone, and a 2011 Mini Server
    that I use as an HTPC.
    You can check this out for all the Yosemite Server capabilities:
    https://help.apple.com/advancedserveradmin/mac/4.0/
    I have iTunes Home Sharing set up on it and have my entire iTunes
    library on it.  I can then use any of my Macs to play Movies or Songs
    from it and only keep locally a select subset of that on my individual
    devices.
    Rather than and update server, I utilize Server's Caching Service.  The caching
    server will duplicate any update download (system or MacApp Store purchases)
    any time a device that is connected to my network down loads one.  The update will
    then be stored locally and all other devices will download the update from it which
    can be faster than from Apple directly.  This has the advantage of only having to download
    once with limited bandwidth internet connections.  There is also an Update Server service
    available, but it is some what more involved in setting up.  However, it will download
    and store all available updates.
    There is another thing as well if you do not care for syncing things like Contacts, Calendar, etc.
    to iCloud, you can set Server up to sync these items across devices locally.

  • Query field calculation based on a characteristic field

    Hi
    I have a req wherein the query has a field "Balance". Now here the value of the Balance field is calculated based on another characteristic "0bal_flag". 0bal_flag has values "X" or blank. The 0bal_flag is actually a attr of 0gl_account and i have it as a nav attr in my cube.
    The calculation goes like this....
    If 0bal_flag = 'X' then "Balance" = balance (there is a balance field in underlying infoprovider)
    else "Balance" = Debit -credit (these fields are also there in underlying infoprovider....)
    So how do i achieve this...?
    Since 0bal_flag is a char I cannot use it directly in a formula....
    Thanks
    Gaurav

    Hi Gaurav,
    Create a replacement path formula variable on the 0bal_flag with evaluate as boolean checked, you will get the values 1 when flag is X and 0 when the flag is initial, now you can use this 'formula variable' in the formula
    ((0bal_flag==1)balance)+((0bal_flag==0)(debit-credit))
    hope this helps,
    Rk.

  • Bex Query - Specific calculation in query result

    Hi experts!
    I've received a requirement and I cannot find any way to delivery it using the stantard operation or configuration into Bex Query.
    We have a query which have three KF with summarization in result. The new requirement is based in the KF "POND" to change the calculation in the result. Below are the actual result and the expected result.
    The actual query result.
    Line
    OP
    QTD
    TMP
    POND
    A1
    1614073
    702
    19
    13338
    Total A
    702
    19
    13338
    B1
    1587949
    840
    235
    197400
    B2
    1610938
    4.240
    28
    118720
    Total B
    5.080
    263
    316120
    Total A + B
    5.782
    282
    329458
    The expect result based on the new requerment
    Linha
    Ordem de Produção
    QTD
    TMP
    POND
    A1
    1614073
    702
    19
    13338
    Total A
    702
    19
    19
    B1
    1587949
    840
    235
    197400
    B2
    1610938
    4.240
    28
    118720
    Total B
    5.080
    263
    62
    TOTAL A + B
    5.782
    282
    57
    Check out the "Total A" result for KF "POND", the new calculation is the sum of KF "POND" divided by the sum of KF "QTD" (13338 / 702 = 19)
    The same to "Total B" result for KF "POND", the calculation is the sum of "POND" divided by sum of KF "QTD" ( (197400 + 118720) / (840 + 4240) = 62).
    I've been using all recourses into Bex query, but I've haven't found any way to deliver this requirement, though.
    I'd really appreciate if anyone could give me some suggestion to deliver this requirement.
    Thank you.
    César Sevilha.

    Hi Suman!
    Thanks for your replay.
    The collision options wont help me because I have calculation on the same structure.
    I need to keep the division POND by QTD in the result. Check out the table below.
    The Formula Bex Query (POND / QTD) is a simple division between  KF POND by KF QTD, the result
    is a totalization of lines A and B.
    The requirement is to keep this division on the result. Check out the column Requirement, this is the result expected.
      Line
      OP
      QTD
      POND
    Formula
    Bex Query (POND / QTD)
    Requirement
    A1
    1614073
    702 KG
    13.338 KG
    19 KG
    19 KG
    Total A
    Result
    702 KG
    13.338 KG
    19 KG
    19 KG
    result (POND) divided by result (QTD)
    B1
    1587949
    848 KG
    197.400 KG
    233 KG
    233 KG
    B2
    1610938
    4.318 KG
    118.720 KG
    27 KG
    27 KG
    Total B
    Result
    5.167 KG
    316.120 KG
    260 KG
    61 KG
    result (POND) divided by result (QTD)
    Total A + B
    Result
    5.869 KG
    329.458 KG
    279 KG
    56 KG
    result (POND) divided by result (QTD)
    I'd like to know how to keep the division in the result.
    Example:
    The result of Total B should be 61 kg which is the result of division between the result of KF POND (316.120) by the result of QTD (5167).The currently formula has as result the totalization  of B1 and B2.
    Thank you in advance.
    César Sevilha.

Maybe you are looking for