Cumulative Quantities in a BEx Query

Hi Friends,
I have to get the Cumulative Values for a Key Fig Actual Quantity in a BEx Query.
The scenario is as follows:
I have the following data in the cube:
YearWeek       ActQuantity
  200601                     35
  200602                     40
  200651                      30
  200652                      35
  200701                      20
  200702                      35
  200703                      45 
  200747                      30
  200748                      45
  200749                      40
  200750                      25
  200751                      40
  200752                      35
  200801                      40
  200802                      35
  etc.,
The Report Req is as follows:
   The user will enter any range (Eg: 200748 - 200802)
and he wants to see the report as follows:
YearWeek ActQnty  CumQnty
                               (Cumltd from 1st wk of the year)
200748                    45             2500  (2455 + 45)
200749                    40             2540  (2500 + 40)
200750                    25             2565
200751                    40             2605
200752                    35             2640
200801                    40                40 (since it is 1st week)
200802                    35               75
Important thing is the report should show the quantities only for that period (weeks), the user entered. But the cumulative values must be from the first week of that calender year.
Thanks for any help/suggestion.
Regards,
Ranjith

Hi Rakesh,
   Actually the user enters two values (eg: 200740 - 200748) and he wants to see the actual quantities and cumulative quantities only for the weeks between the user entered i.e., between 200740 and 200748.
  But when I execute the query with user exit variable I defined, I am getting actual quantities and cumulative quantities from 200701 to 200748. The values are correct but I want to restrict this report only to the period between 200740 and 200748.
  The user entry range may also cross between two different years (eg: 200748 - 200812)
Thanks for your help.
Ranjith

Similar Messages

  • Getting a percentage on cumulative values in Bex Query

    We have a Bex Query where we have 4 columns. For the actual and projected attendence, I'm displaying cumulative values and a percentage.  I want the percentage to be based on the cumulative values, but it's giving it to me based on the actual values (what's coming in, not what's being displayed).  How do I get it to do the calculation on the displayed values?
    This is the actual data coming through:
    Month/yr____actl att___________ proj att   
    01/2005_____10________________10                            
    02/2005_____10________________10                                   
    03/2005_____10 ________________20              
    What I'm getting now:
    Month/yr_____cumulative actl att_____cumulative proj att_____percentage
    01/2005_____10____________________20_________________50%
    02/2005_____ 20 ___________________30________________100%      
    03/2005 _____30 ___________________50_________________50%
    What I want is:
    Month/yr_____cumulative actl att_____cumulative proj att_____percentage
    01/2005_____ 10 _____________________20_______________50%
    02/2005______20_____________________30_______________66.67%      
    03/2005______30_____________________50_______________60%

    Julie,
    The OLAp processor in BI cannot take cumulated values - that is  - once you cumulate your values - the cumulated values cannot be used further in BeX formulae - even if you use them the actual values will be used.
    Month/yr____actl att___________ proj att
    01/2005_____10________________10
    02/2005_____10________________10
    03/2005_____10 ________________20
    What I'm getting now:
    Month/yr_____cumulative actl att_____cumulative proj att_____percentage
    01/2005_____10____________________20_________________50%
    02/2005_____ 20 ___________________30________________100%
    03/2005 _____30 ___________________50_________________50%
    What I want is:
    Month/yr_____cumulative actl att_____cumulative proj att_____percentage
    01/2005_____ 10 _____________________20_______________50%
    02/2005______20_____________________30_______________66.67%
    03/2005______30_____________________50_______________60%
    This would mean you will not get the desired output - the only way to do that is to use local macros / formulae in the workbook.
    Arun
    Hope it helps...

  • Where to write IF THEN ELASE statements in BEX Query Designer

    Hi All,
    I need to write a formula in query designer...
    saying that to display the all Quantities in KGs.. Now articles are in Grams and KGs...
    So here i need to perform calculation like... if article is in KGs divide by 1, else if article is in Grams divide by 1000.
    where can i write this logic to perform calculation ...
    Thanks in advance..
    ravi.p

    hi chetan,
    No its not work.. why because i  need to convert the unit of measure in Masterdata Attribute values... that means ) ' 0grooss_wt'.  this is  attribute as a keyfigure of ' 0material' .. this ' 0gross_wt' values has to convert in KGs. at Present ' 0gross_wt' values are in KG and Grams...
    I can change these values in update rules by writting  Routine.. But I need to convert it in KGS at BEX Query Designer Level..
    I need calculate like this
    quantity sold * Gross Weight. 
    here Gross Weight is the formula variable which replacing the values of gross weight...
    i tried by creating conversion types in RSUOM t-code. but it works on keyfigures of infocube.. not on attribute values of master data...
    is there any solution to solve this Problem...

  • Cumulative quantities not showing

    Hi experts,
    I have defined following structure in BEx query designer. The cumulative balance column is not displaying correct result.
    The "cumulated" option has been selected for the formula "Cumulative Balance".
    --- Debit | Credit | Monthly Balance | Cumulative Balance |
    Jan | 100 | | 100 | 100 |
    Feb |  | | | |
    Mar | 400 | | 400 | 400 |
    Dec
    I used to have correct data displayed when there are values for the whole year (from Jan to Dec). Hence, I suspect the problem lies on the unfilled rows (Feb in this example). Besides, I used to have a result row at the bottom of the structure as well!
    1. Is there any solution to this problem?
    2. How can I display zeros (0) instead of blank for the months without values?
    3. How can I display a result row at the bottom of the structure?
    Thanks in advance for your advice.
    Regards,
    Joon

    hi,
    Instead of creating structure you can see the cumulative values at a runtime only.
    right click on the KF, properties > data cell> calculation tab -->check cumulative after applying single value.
    Calculate single value -- sum
    calculation direction -- calculate along row
    tick apply detail calculation to result
    Calculate result as -- Sum
    tick calculation based on previous calculations.
    this way the KF will show the cumulative values at runtime, you can save the view as global view and publish to users.
    This has an advantage as this is easier to do rather than defining each cell in structure.
    regards,
    Arvind.

  • BEx Query- Making into Zero value in the blank row/column

    Hi All,
    I am running a query on multiprovider, say I have three characteristics (sales org, distribution, customer) & key figure (amount) in the layout. I am lookling the actual & plan data in the report.  If there is no plan data for the above combination of characteristics, in the report i am getting blank, instead of blank i want $0.00, how to do this?
    Regards,
    Anand

    Hi ,
    Could you please let me know how can we fix this issue.  I tried to create a new formula as KF+0 but it did not work.
    Hi ,
    This issue is in a Bex Query . We are looking for options on how to display blanks as zeros for keyfigures.In the below screen shot highlighted in red there is no data for march 2015 so it needs to display as zero and the overall result should be Zero.
    Issue : Overall Result for Cumulative Quantity FTE should pick up the last value which is Mar 2015 instead its displaying 2 as there is no data for Mar 2015.
    Thanks,
    Bharathi.

  • Calculate cumulative balance in the PCA query

    Hello All
    1. I have a requirement where I have to calculate the 'Cumulative Balance' at a G/L Account, Fiscal Year/Period Level for PCA data.
    2. I am not able to find any source field in R/3 so that I can simply enhance the 0EC_PCA_3 extractor and get it into the PCA cube.
    3. The basic logic is:
                    I have 0CREDIT and 0DEBIT KFs in my cube.
                   The difference of  0CREDIT & 0DEBIT = Balance (ie. credit + debit)
                 But, Cumulative Balance (say for period 1/2010) = Balance for 1/2009 + Cumulative balance for 12/2008 (year end)
    Another ex, Cumulative Balance (say for period 2/2010) = Balance for 2/2009 + Cumulative balance for 1/2009       
    (NOTE: If we go back to the first period when SAP went live in this company, ex: 01/2002 then will see that the:
                       Cumulative balance for 01/2002 = Balance for 01/2002 + 0 (since there is no prior ***. balance)
    4. I can clearly see that I cant do this in the cube by using ABAP, since its granularity goes to Accounting Doc, Material level (ie item level).
    5. So I have to do this on the fly in the BEx Query, by writing a customer exit. I dont think simple offsetting variables would work either.
    Can anyone give me a possible solution to the above problem?
    Regards.

    hi is your problem solved , if so please describe here.
    now i am having the same problem

  • Displaying dates as column headers for BEx Query

    Hi all,
    I have to display dates in sequence as descriptions for 15 columns based on the keyed in date in Bex Query Analyser. I'm able to display date as column heading for one column using text variable with replacement path.I could not able to increment date for other descriptions.Could you please help me to solve this issue.
    Ex: Input Date 05/09/2007 then in the out put column headers should be 0509 0609    0709   ............ 1909
    These are only column headers, values for the columns are quantities calculated using formulas.
    It is urgent.
    Thanks in advance.
    Regards,
    Mandadi.

    hi mandadi,
    if u want dates as headers only then u should use a text variable .
    as a rule u can not set off set for text variable so u create restricted key figure with date restricted and set off set.
    now u use this rkf to populate the text variable using replacement path.
    text variable can use replacement path for replacing from any variable and characteristics.
    bye

  • IF and ABS condition statement in BEX query designer

    Hi,
    I would like to ask the best way for me to produce an acceptable result from Excel IF and ABS Condition statement.
    The condition statement that I have on my Excel file is
    =IF((A2-B2)>0,ABS(A2-B2),0)
    I'm trying multiple times to reproduce this in BEX Query designer, unfortunately I'm getting a bad result or unacceptable formula.
    Anyone who could help me with my issue?
    Thanks,
    Arnold

    Hi Arnold,
    Thank you,
    Nanda

  • Error while trying to Open and Delete a BEx Query in Query Designer.

    Hi Experts,
    I have been facing this issue with BEx Query in Designer mode for a couple of days now in Development Environment in BI 7.0.
    I would like to Delete an unwanted BEx Query because I need to give it's name to another BEx Query.
    Whenever I try to Open this Query in BEx Query Designer to Delete, it gives out an error saying:
    "An error occurred while communicating with the BI server.
    As a result of this error, the system has been
    disconnected from the BI server.
    Detailed Description:
    STOP: Program error is class SAPMSSY1 method : UNCAUGHT_EXCEPTION
    STOP: System eror in program CL_RSR and form GET_CHANMID-01 - (see long text)"
    Details text is as below:
    Diagnosis
    This internal error is an intended termination resulting from a program state that is not permitted.
    Procedure
    Analyze the situation and inform SAP.
    If the termination occurred when you executed a query or Web template, or during interaction in the planning modeler, and if you can reproduce this termination, record a trace (transaction RSTT).
    For more information about recording a trace, see the documentation for the trace tool environment as well as SAP Note 899572.
    I have tried with SAP Note 899572, but still it's the same.
    Has anyone faced similar issue? Could you please let me know if you have better ideas or solution?
    Your time is much appreciated.
    Thanks,
    Chandu

    Arun - Thanks a million. You saved me Nine. It worked.
    Could you also please tell me how to rename (Technical) a Query or is it still "Save the Query As" the only way...?
    Points already assigned.
    Thanks,
    Chandu

  • How can we remove the commas from the Formula value in SAP BW BEx query

    Hi All,
    How can we remove the commas from the Formula value in SAP BW BEx query
    We are using the formula replacing with characteristic.The characteristic value needs to be display as number with out commas.
    Regards
    Venkat.

    Do you want to remove the commas when you run the query on Bex Web or in RSRT?
    Regards

  • Field Explorer in Crystal Reports does not show the same names as Bex Query

    Hi
    I have crystal reports, I can retrieve data from BW Bex Query. But in the field explorer it does not show the names as in the Bex query designer.
    In the Bex query designer a field will have the following technical name 0Debitor and the description is Customer.
    It shows in crystal reports in the field explorer twice as D[0DEBITOR]D and D[0DEBITOR]D. It also does not seperate key figures and characteristics.
    I would like it to display the field explorer as shown in this blog.
    /people/ingo.hilgefort/blog/2008/02/19/businessobjects-and-sap-part-2
    Thanks in advance

    Hi,
    take a look here:
    /people/ingo.hilgefort/blog/2008/02/19/businessobjects-and-sap-part-2
    make sure you are using the MDX Driver and what happens is that you will see several fields per characteristic. example: one for the key, one for the description, several if modelled for the display attributes
    Ingo

  • Two problmes between  Crystal Reports 2008 and Bex Query

    Hi Gurus.
    I have two problems with Crystal Reports 2008 when It obtains data from a Bex Query (SAP MDX query connection).
    1)     I have defined some Parameters Fields using the follow options:
    Type: String
    List of Values: Dynamic
    Value Options Level1:
                         Show on (Viewer) Panel :Editable
                          Prompt text: <text>
                          Sort Order: Ascending by value
                          Prompt With description Only : False
                          Optional Prompt: True
                          Allow multiple values: True
                          Allow discrete values: True
                          Allow range values: False
    When I execute the report with the client of Crystal Reports 2008 (the developer tool), in the initial screen shows a list box where I can select the values from the left box and add it to the left box (as a usually filter). When the number of options (LOV) is more than  the maximum of the system, I have a input box bellow the list box, where I can insert any value (manually) and a button to insert it into the left box. When I publish the Report in the infoview, this filter is modified and the input box where I can introduce manually values is not showed and I can insert only the values showed in the list box, it causes that I can`t select a lot of values that is in the master data of SAP BW, because they arenu2019t listed in the list box.
    There is any option to ability this option in the infoview.
    2)     My Bex query, have a date filter with variable in the restricted key figures, when I execute a Crystal Reports, the infoview (and the Crystal Reports 2008 designer) ask me 2 times the same date, first only the date and second the date and the rest of parameters (introduced in the report of Crystal Reports).
    Why I need insert the date 2 times? How can I modify the Crystal Report for ask me only one time all the parameters?.
    Thanks.

    Hi Abhilash.
    Thank you for your information.
    1) Yes, the parameters are created in the Crystal Reports designer. I have created the parameters in the Crystal Report because I use the same Bex Query to create some Crystal Report, in other case, I will need create some Bex Query.
    2)The Bex query has the date filters and I have created some filters in Crystal Reports designer, the date filter from the Bex query is created automatically in the Crystal Report Designer but I don't use it, I haven't created it anytime. I use my filters only in the record selection. The date filters from the Bex query is showed as Static, and I can`t delete it, if I modify the parameter to dynamic or static with values, at first step ask me again static without values and the second step of the report execution ask me the parameter as I have defined in Crystal Reports Designer, my parameters fields are dynamic. A lot of reports have subreport, but I have created one of them without subreport (to trial) and the Crystal Reports ask me the date filters at first execution, and when I insert the date filters, in the second step, ask me the date filters again and my parameters fields again.
    Thank you again.

  • Status of data in Bex query shows wrong date

    Dear Experts,
    The Bex qurey after sucessful execution, show the Status of data as old date i.e. feb 2012. but we observed that the data uplaod happens regularly and sucessful.
    we tried executing the same query using RSRT/Bex Analyzer/Portal. the results are same i.e. showing incorrect status of data.
    Note: The Bex query is built on BI Infoset which sources from DSOs and Master Data infoobjects, and  BI version is 7.0.
    Kindly please help for resolving the issue.
    Best Regards,
    Mannu.

    Hi Vijay,
    The data upload has happend today also and it is sucessful, the reporing status is available for requests from respective infoproviders.
    'Status of data' is not a filed. if it an information to tell the status of data in query result.
    Please find the following steps to find the 'status of data'
    go to RSRT->give the query name and execute-> now after query results-> go to last page-> you can find the 'status of data'.
    Best Regards,
    Mannu

  • Message in BEx Query Designer Formula

    Hi Experts,
    I need to display message based on the value of the formula result. For Example:
    If K.F1 =<2.5 Then <Message: ODD>
    ElseIF K.F1 >2.5 Then <Message: Even>
    Else
    <Message: Determine the value>
    EndIF
    Thease above messages would be build in the formula column of BEx query designer
    Thanks and really appreciate your response.
    Regards,
    Waseem

    Hello,
    I have done the same funtionality with the help of workbook.
    May be experts can guide us how to display  messages in the formula column of BEx query designer.
    Thanks.
    With regards,
    Anand Kumar

  • Drilldown in BeX Query Designer

    Hello,
    I am new in SAP. I am having problem creating Drill down. I have this report where all the data is Transactional data. So I haven't created any Master Data. So I won't be able to use Navigational Attribute for Drill down purpose and I don't want to use Hierarchy. Is there any possibility of getting the Drill down in BeX Query Designer? Any help will be appreciated.
    Warm Regards,
    Debayan

    Hi Debayan,
    first of all, what is your requirement to create a drill down?
    A drill down in BEx query means showing additional information from report output. There are 3 ways to drill down a query in BEx
    1. Master data-Navigational Attributes
    2. Master data- Hierarchies
    3. Free characteristics
    As you dont have any master data in the report (which is very strange) you can use the additional characteristics provided in the 'Free characteristics' to see how the drill down works in BEx.
    Please share your exact requirement.
    Hope this helps.
    -Swati.

Maybe you are looking for

  • How to delete cloud from pc

    how to remove icloud from my library

  • Canvas size

    Hey guys! Just a quick question. I'm taking an intro Java course this semester and for one of our labs, we have to create a voting system that counts mouse clicks as votes. We're instructed to have at least 12 different candidates, but 12 boxes won't

  • WEB Dynpros

    Hi, can anyone will help me out in web Dynpro's i want to call RFC R/3 function in Web Dynpors i created the RFC function and called in Web dynpro's i wnat to add the contents to r/3 data base and display the values on the Web , plz can anyone will t

  • Need to execute a FM before any program is executed

    Friends, I have a requirement of executing a FM before every Z program is executed in Background. Can anyone plz suggest a way to accomplish this. Otherwise we may have to change all programs to incorporate FM call. Thanks friends Bhaskar

  • Leading zero's on form showing up in SAP PROD but not in SAP QC

    We created an Adobe form as a copy of PM_COMMON_JOBT via SFP and made some enhancments. We tested the form and program very properly and on the form in QC the order number is showing without leading zero's. We didn't touch the sap standard data bindi