How to calculate avg value in bex

Hi all
I have a requirement
I want to run a query for a particular period say 0032005.
in the query output value will display for all prior period in different column. for perod 003
it will display value for 001 , 002 ,003. and
at the last column  i want calculate the avarage for this 3 period. these should be dinamic.
if i run this query for period 0052005. query will display value for period 001 ,002 ,003,004,005 and last column will display avarage for the 5 period.
i am able to diaplay each prior period in different column that is fine. but i am not abel to calculate the avarage column.
example
selection screen :
fiscal period : 0042005
Query output
Char 0012005 0022005 0032005 0042005   Avg
     88        99     77       66     (889977+66)/004
Please any one know about please help with steps.
Thanks

I have a requirement
I want to run a query for a particular period say 0032005.
in the query output value will display for all prior period in different column. for perod 003
it will display value for 001 , 002 ,003. and
at the last column i want calculate the avarage for this 3 period. these should be dinamic.
if i run this query for period 0052005. query will display value for period 001 ,002 ,003,004,005 and last column will display avarage for the 5 period.
i am able to diaplay each prior period in different column that is fine. but i am not abel to calculate the avarage column.
example
selection screen :
fiscal period : 0042005
Query output
Char 0012005 0022005 0032005 0042005 Avg
88 99 77 66 (889977+66)/004
I got the resolution as bellow.
In the Characteristic Property Set it as Suppress Result Rows-> Never. For the key figure Set Calculate Result Rows-> Average of All Values.
yes it is working fine . but there is a small problem in the column heading for this colume is displying as overall result. but values are displying as a avg value. how can i change it.
why i ahve to create a text variable. please explain

Similar Messages

  • How to calculate acquisition value for specified day

    Hi,
    in my z program I have a problem how to calculate acquisition value for my asset for specified day.
    Example:
    I have asset created 8.7.2008 with TTYPE 104 (External asset acquisition) with value 5950.
    30.11.2008 there is another TTYPE 272 (Retirement of current-yr acquis., w/o revenue) with value 950.
    So BEFORE 30.11.2008 acquisition value is 5950. After is 5000. Is there any function module (or something else) in SAP system where I can send asset number and date a it return to me acquisition value for that day?
    Many thanks for any answer!

    Hi,
    your suggestion means that I have to compute acquisition value by myself (sum all TTYPE 1** - sum all TTYPE 2**). So SAP does't provide such functionality (LDB ADA have it, because it can compute acquisitiob value for specific day)?
    Mant thanks for answer

  • How to make empty values in Bex to zero so that WEbI also has 0

    Hi
    I have a webI report on Bex query, some of the values in the columns are empty in Bex, so even the webI report is showing blank values. But when i want to calculate totals, avg, or alerts on that column in WebI then I need to write a formula for each measure saying
    if(isnull([keyfigure])) then o else [keyfigure]
    It is working in WebI but lot of custom work need to be done, instead is there any setting in Bex or WebI saying that columns with the "blank" values in Bex should be shown as "0" in the webI report column?

    Hi,
    Take a look here:
    Re: Fill empty cell with '0'
    Steps to fill empty cell with '0':-
    1. Select intersection cell in cross tab.
    2. Go to properties tab.
    3. In Text Format section, click on Number Format button.
    4. Select Format type is 'Number' and check the Custom check box.
    5. Enter 0 in all text boxes(Positive, Negative, Equal to zero, and Undefined).
    6. Click ok.
    Now you can see 0 in the Emply cells of cross tab.
    If you want decimal values, enter 0.00 in Positive box.
    Edited by: Swarna K on Mar 12, 2011 9:25 AM

  • How to calculate Last year in BEx Report

    Hi Experts
    I have a requirement to create report in BEx --> report output will be Amount, Diff in percentage(Plan-Actual),Last year
    My question how we calculate the Last year and actual minus plan difference in percentage

    Hi,
    Make use of % functions in query designer to get the desired result.Please search on forum lot of examples will be there.
    Hope it helps.
    Regards,
    AL
    Edited by: AL1112 on Mar 7, 2011 4:56 PM

  • How to calculate usage value through measuring document.

    Hi,
    While creating Sales Order with reference to a Contract i need to update the usgae value in the Order Quantity ( RV45A-KWMENG ) field (at line item level).
    Can you help me calculate usage value through measuring documents for equipment over a period of time.
    Is there any function module for the same?
    Thanks.

    Hi,
    To determine the usage value of a an equipment I had followed the following.
    From table STPO, check if the material receipted belongs to a standard BOM (STLTY='S')
    If yes, record the BOM (STLNR)  and the BOM item node number (STLKN)
    From PLMZ table, select the task list type (PLNTY), the key for task list group (PLNNR), the group counter (PLNAL), the task list node number for operation (PLNKN),   if the record is not flagged for deletion (LOEZ)
    From PLFH table, select the object type of the CIM resource (OBJTY), the object id of the resource (OBJID), the usage value (EWVGW) if the record is not flagged for deletion (LOEZ)
    From CRVE_A table, select the equipment number (EQUNR)
    The result of this selection will be all the tools which can be used for the production of the material receipted.
    The measuring point for this or these equipment(s) will be selected from equipment number and EQUI table
    The result of this selection will be all the measuring point to update.
    Create new measurement document for the selected measurement point (transaction IK11)
    Technically go as follows:-
    MAT = material receipted
    Select STLY, STLNR, STLKN from STPO table where IDNRK='MAT' and STLTY='S'
    If results exist
    Select STLTY, PLNNR, PLNAL, PLNKN from PLMZ where PLMZ.STLTY=STPO.STLTY and PLMZ.STLNR=STPO.STLNR and PLMZ.STLKN=STPO.STLKN
    And PLMZ.LOEZ<>'X'
    Select EWVGW, OBJTY, OBJID from PLFH twhere PLFH.STLTY=PLMZ.STLTY and PLFH.PLNNR=PLMZ.PLNNR and PLFH.PLNAL=PLMZ.PLNAL and PLFH.PLNKN=PLFH.PLNKN and PLFH.LOEKZ<>'X'
    USAGE=PLFH.EWVGW
    Select EQUNR from CRVE_A where CRVE_A.OBJTY=PLFH.OBJTY and CRVE_A.OJBID=PLFH.OBJID
    All the equipment number selected at this moment will be called EQUIP in the next steps
    EQUIP= Equipment number previously selected
    Select OBJNR from EQUI where EQUNR=EQUIP
    Select PARNR from IHPA where OBJNR=EQUI.OBJNR
    If PARNR = Vend then
    Select IMRC_POINT from equi where equnr=equip
    All the measuring points  selected at this moment will be called MEASP  in the next steps
    For each MEASP
    Insert into IMRG the new increment value  (USAGExMAT) in field CDIFF
    Remark: the field CDIFF is managed in floating point number, accurate to 8 bytes.
    I hope this is useful for you.
    Regards,
    Ankur Parab

  • How to count Unique Values in BEx

    Hi Guys,
    Can anybody please let me know how to count unique values of a characteristic.
    Thanx in advance
    Peter

    I have a similar scenario. If i drill up on the characterstic that had a count of one in each record, the total number of records should be stay equal to the summarised results in the last screen.
    Would someone know how to do that .
    Arti

  • How to remove unassigned(#) value in bex report in 04s

    Any help on hiding/ removing unassigned(#) value in bex report in 04s , the query is created on an infoset( left outer join).

    you can exclude # in your restriction...
    assign points if it helps

  • How to calculate query value on extended range of data

    Hi,
    This is my first post, so let me greet all forum users. I'm reading the forum for few weeks and I'm really impressed with the force of this community.
    My question is based on some real problems but I'll ask in general:
    In a BEx query - is it possible (and how?) in a result cell to obtain value that is calculated based on some more extended range of infoprovider records than it results from all the characteristics related to that cell?
    The question is somehow about a reverse case to the restriction in Selection. I'm asking about a kind of 'extension' of selection.
    Example for the question follows (it is somehow simple, I put it here just to picture the problem, note: the question is more general!)
    cube: ch: 0CALMONTH, 0MATERIAL, 0PLANT
          kf: 0QUANTITY (ex. of outgoing deliveries)
    What I need is to obtain in any query the SUM(0QUANTITY) over all 0PLANT (this can lead to knowing the 'activity' of the specific plant by calculating the share. that activity can be calculated at diferent level of detail).
    The 'dream' query would look like:
    rows: 0CALMONTH, 0MATERIAL, 0PLANT      
    cols: 0QUANTITY  SUM_OVER_0PLANT
    resulting in ex:
    0CALMONTH  0MATERIAL  0PLANT  0QUANTITY  SUM_OVER_0PLANT  PLANT_ACTIVITY
    2005.01    00001      P100    10         30               1/3
    2005.01    00001      P200    20         30               2/3
    2005.01    00002      P100    30         70               3/7
    2005.01    00002      P200    40         70               4/7
    2005.02    00001      P100    50         110              5/11
    2005.02    00001      P200    60         110              6/11
    2005.02    00002      P100    70         150              7/15
    2005.02    00002      P200    80         150              8/15
    after removing drill 0MATERIAL:
    0CALMONTH  0PLANT  0QUANTITY  SUM_OVER_0PLANT  PLANT_ACTIVITY
    2005.01    P100    40         100              4/10
    2005.01    P200    60         100              6/10
    2005.02    P100    120        260              12/26
    2005.02    P200    140        260              14/26
    after removing drill 0CALMONTH:
    0PLANT  0QUANTITY  SUM_OVER_0PLANT  PLANT_ACTIVITY
    P100    160        360              16/36
    P200    200        360              20/36
    For this specific case I investigated several solutions:
    1) using formula & function SUMCT (Result). This has a drawback that Result for 0PLANT must be present in right place (bottom level) in the resulting query. I don't like this.
    2) SUM can be directly precalculated in the cube. Well, I'd prefer Bex only...
    Please keep in mind also following:
    1) there may be a need to refer to the data that is outside prompt/filtering/restricting range.
    2) I want to preserve all the OLAP freedom, so all the solution should be a query with some tricky formula/kf/??? to be used by user in any situation and producing right result.
    I hope I'm not demanding to much...
    (now after this long example please have a look at the question again!)
    Regards,
    Mirek

    Hi Ashwin,
    while using SUMCT I loose the freedom of OLAP. SUMCT calculates properly SUM_OVER_0PLANT only when the 0PLANT is the lowest drillin level. If this is not the case (ie. some other ch is the lowest level or 0PLANT results are suppressed) the approach won't provide right result.
    sure I will reward all helpfull posts.
    regards,
    Mirek

  • How to Calculate Avg Stock

    Hi Experts,
    User wants to see Avg stock in the report
    say stock values are as following
    MONTH-StockReceipts- Sales- Closingstock 
    1-          365-     12-     353
    2 -          0-     89-     264
    3-          0-     80-     184
    4-          0-     110-     74
    5-          0-     12-     62
    6-          365-     24-     403
    7-          0-     110-     293
    8-          0-     12-     281
    9-          0-     67-     214
    10-          0-     90-     124
    11-          0-     100-     24
    12-          0-     24-     0
    if user enters 01.01.2011 to 31.12.2011
    Avg stock  should be 189.6(this is the avg of closing stock)
    in this example total Stock Receipts 730, Sales 730 and Clsoing stock on 31.12.2011 is 0.
    in the Report along with this Avg stock there are other key figures also.
    how can we calculate the avg stock value based on every month closing stock between the time interval.
    say if user enter 01.01.2011 to 31.12.2011 then i ahve to consider the 12 periods closing stock
    Regards,
    Chandra

    Dear Chandra,
    Are those months 1 2 3... all selections? i.e there is no calmonth out of the structure isn' it? Then yes my reply doesn't work.
    Because the formula is wrong.Not the key figure .I think you don't have to create lots of key figures.This unique key figure of closing stock is restricted by the user's input and takes the value of everything between that input.E.g if the user inputs 05.02.2011-17.08.2011 then the key figure must take the sum of the values of closing stock between that date, in my opinion.
    Now let me correct the formula, you must divide this key figure to the number of months(forget about the average, it was wrong). And number of months between the user input interval must be calculated by the ABAP code i.e a user exit variable.
    Hope it helps,
    Sunny

  • How to calculate the data in bex

    Dear all,
                i have a service order no and it current active status  and it time stamp details in my query
    example
    sevice orer no  posting date name    current active status  active status date    part aging
    800000243      15.01.2009   shahina part despatched          A     17.01.2007  
    in my ods i have
    sevice orer no  posting date name    current active status  active status date    part aging
    800000243      15.01.2009   shahina part despatched          A    17.01.2007  
    800000243      15.01.2009   shahina part pending               x    16.01.2007  
    800000243      15.01.2009   shahina part for asp                 x    17.01.2007  
    i want to calulate the aging of part pending to part despatched
    17.01.2009   -   15-01.2009   = 2 days
    i want to display in my bex like this
    sevice orer no  posting date name    current active status  active status date    part aging
    800000243      15.01.2009   shahina part despatched          A     17.01.2007      2
    ( in bex report i want to display only active status )
    can any one help me please to solve this issue
    Regards
    shahina

    Hi vamsi talluri ,
      i working in crm reports ( service ) here i want to calulate the differance between the old status that is inactive status date to part despathed date
    sevice orer no  posting date name    current active status  active status date    part aging
    800000243      15.01.2009   shahina part despatched          A     17.01.2007  
    in my ods i have
    sevice orer no  posting date name    current active status  active status date    part aging
    800000243      15.01.2009   shahina part despatched          A    17.01.2007  
    800000243      15.01.2009   shahina part pending               x    16.01.2007  
    800000243      15.01.2009   shahina part for asp                 x    13.01.2007  
    i want to calulate the aging of part pending to part despatched
    17.01.2009   -   13-01.2009   = 4 days
    i want to display in my bex like this
    sevice orer no  posting date name    current active status  active status date    part aging
    800000243      15.01.2009   shahina part despatched          A     17.01.2007      4
    in bex i am dispaying only active satus but i want calculate diff bet active status which i am dispalying in the bex analyzer and old status whaer the data are available in sercice order ods
    please help me how to perform the calculation
    Regards,
    shahina..!
    ( in bex report i want to display only active status )
    can any one help me please to solve this issue
    Regards
    shahina..!
    Edited by: Shahina A on Jan 21, 2009 6:13 AM

  • How to calculate mean value of a matrix

    Hi... I ve one matrix of order (m*n). I need to calculate the mean value of this matrix. How to do this?
    let we consider the matrix as 4x4.(Row=Column=4) The resultant matrix i.e mean value matrix is 1x4(Row=4,Column=1). To read the row value simultaneously in order to calculte the mean value thro row.... ?  please help me out
    Example:
    Matrix A=1 2 3 4
                   5 6 7 8
                   1 3 5 7
                   2 4 6 8. 
    Mean value thro row would be:   10/4 [  (1+2+3+4)/4
                                                      26/4 [ (5+6+7+8) /4...Like this i ve to do..
    Please help me out

    Hi,
      See this attachment.....
    Thanks and regards,
    srikrishnaNF
    Attachments:
    Example_VI_BD.png ‏3 KB

  • How to enter multiple values in BEX Analyzer 7.0

    We are on 7.0.  I created a query in Query Designer with a variable type of Select Option.  When I execute the query in BEX Analyzer, how do I enter multiple selections?
    Thanks.
    Ryan

    Hi Ryan,
    You need to click on the button on the right of the variable (with a white square). In the box that pops up, choose your values. On the same screen, click the More>> button to see your selection and change the order if required.
    Hope this helps...

  • How to calculate the value of key figure by considering other char or kf

    Hi
    My requirement is like this:
    I have a key figure which gives me the planned issues and receipts but i know that if only from locaton is blank  and to loc is filled then that are receipts and if both the from and to location values are filled then it is issues,
    can you pls let me know how i 'll put this logic in th reporting bex and how i achieve this by user exit or any other way
    thx
    rubane

    Create two RKF, restrict first with [ from = '#' ] to get the planned receipts, and restrict the second with [ from <> '#' and to <> '#' ] to get the issues.

  • How to use rounded values in BEx Formulas

    Hello,
    I have the following question. Is it possible to use rounded values up to a certain # of decimal points in BEx Formulas?
    I have the following problem.
    Consider this:
    keyfigure val 1 = 0.416666667
    keyfigure val 2 = 72
    val 3 (BEx Formula)  = val 2 / val 1 = 172.799999862
    However, what I need to do is this.
    val 1 & val 3 should rounded up to 2 decimal points. So, I really need the report to show this:
    val1 = 0.42
    val2 - 72
    val 3 = val 2 /val 1 = 171.43
    I changed the number of decimal places on val 1 and val3 to be 0.00. However, it appears that these rounded values are not taken into account in  the Formulas, as if the OLAP still uses the original values from the backend with 9 decimal points. So, no matter how many decimal points I use on the Display tab for a key figure, my val3 or result of my formula is always taking into account the 9 digit decimal values, not rounded values that I want. So in the example above, my val 3 comes to 172.80, which it should be 171.43 instead of you use the rounded values in the calculation.
    Please let me know if there is any workaround where I could force my BEx Formula to utilize the rounded values and not actual values from the backend DSO. Or any other solution.
    Thank you

    If you create a Formula in BEx Query Designer like the one below, it works:
    val3 = val2 / ( TRUNC ( ( val1 * 100 + 0.5 ) ) / 100 )
    The TRUNC function (among other things) actually ensures that your formula takes into account the rounded values that you want.

  • How to  show Blank values in Bex Report

    Hi friends ,
                       In my bex report one of the KF Column having zero's  and Blank values .
    Ex .   Mat     Price
              A         0
              B        
              C        15
                                    when i create a condition  Price > 0 
    Then the given Out put is    
                                            Mat     Price  
                                             C        15    
                                                                       but the required Out put is 
                                                                                                               Mat     Price
                                                                                                                B 
                                                                                                                C        15
    I.e  I have to Remove only zeros and i should show blank values. Could you pls give some Ideas on this .

    Hi friends thanks for response,
    but my requirement is
    Mat                 
    Price1
    Price2
    A
         0
    B
    12
    C
       15
    D
    0
    E
        8
    F
         0
    The Required  Out put should be
    Mat
    Price1
    Price2
    Price3 (1+2 )
    B
    12
    12
    C
    15
    15
    D
    0
    0
    E
    8
    8
    The user don't want see materials Price1 which  is Zero . So  I should remove materials A and F  in Price1 column .
    IF i apply condition on Price1 > 0  in the out put B and D also not displaying bcoz  blank values consider as Zero.
    Can you pls give some ideas how to full fill this Requirement

Maybe you are looking for

  • FBL3N & FBL1N combination report

    We downloading data from FBL3N (GL line items) & FBL1N (Vendor line items). We then merge these two reports and based on the data of FBL3N (cost center/ order), we manually get Department, Location, Region & Order type. This entire exercise for every

  • Deleting incomplete folder in finder. Is that okay to do?

    I have like 1000 songs in there. Tried accessing them all. None will open. Wanted to make sure it was okay to do before I lost files. Thanks everyone. (will it reappear when more incomplete files download in the future?)

  • Auto set Title to Filename

    On import I want LR to set the title of the image to the filename, but I don't see any option like this. Any thoughts? Aaron

  • Attaching document to task assigned to equipment

    We have documents saved in our DMS by equipment number.  How do we attach a particular document to a task defined in the planned orders?

  • No SOAPAction in dynamic proxy client

    I am trying to consume a .NET Web service from a J2EE client. I am using a dynamic proxy client from http://java.sun.com/webservices/docs/1.3/tutorial/doc/JAXRPC5.html#wp79973 However, I am have a problem with the SOAPAction HTTP header. .NET require