Replacement Path and Aggregation

I need to use a characteristic in a formula so I used the replacement path trick that I found using these forums. Thanks! I have an issue though. In order for the replacement path to work it seems like I have to have the characteristic in my "rows" section. I don't want to see the characteristic in my result set so I have it flagged as "no display". Now the data doesn't summarize correctly.
My data is showing up like:
ABC,123
ABC,234
DEF,123
DEF,234
I want it to show as:
ABC,357
DEF,357
I know the reason ABC and DEF are showing multiple times in the first example is because there are two different values for the hidden replacement path characteristic, but I don't want multiple rows. Is there a way around having hidden characteristics preventing summarization?

Let me give you a better example...
We sell paint. I have an infocube that is at the cans sold grain. If I were to do a query on Color and Cans sold it would return
ColorSold, CansSold
Red, 1
Green, 1
Blue, 3
Orange, 2
Yellow, 3
We don't really have green and orange on stock, we make it upon request by blending the two primary colors. We don't have the data at that level though, only cans sold level. The customer wants to have the data summarized by the base stock colors sold. I know the components though, so I created a table that looks like this...
ColorSold, ColorStock, ColorFactor
Red, Red, 1
Blue, Blue, 1
Yellow, Yellow, 1
Green, Blue, .5
Green, Yellow, .5
Orange, Red, .5
Orange, Yellow, .5
I made a data store out of the table and joined it to my infocube using an InfoSet. I need to be able to do a left outer join, but that isn't really important. Even though ColorFactor is a number, I made it a characteristic because it always tried to aggregate improperly.
My new data set would look something like this. Notice if you were to total it up, you would get double the cans sold for the blends...
ColorSold, ColorStock, ColorFactor, CansSold
Red, Red, 1, 1
Green, Blue, .5, 1
Green, Yellow, .5, 1
Blue, Blue, 1, 3
Orange, Red, .5, 2
Orange, Yellow, .5, 2
Yellow, Yellow, 1, 3
I made a formula variable with a replacement path of ColorFactor called ColorFactor% and made a caculated key figure from multiplying CansSold * ColorFactor% and named it AdjustedCansSold
ColorSold, ColorStock, ColorFactor, AdjustedCansSold
Red, Red, 1, 1
Green, Blue, .5, .5
Green, Yellow, .5, .5
Blue, Blue, 1, 3
Orange, Red, .5, 1
Orange, Yellow, .5, 1
Yellow, Yellow, 1, 3
What I want to end up with is...
ColorStock, AdjustedCansSold
Red, 2
Blue, 3.5
Yellow, 4.5
The problem is, when I simply hide ColorFactor it yeilds.... because it is still in the characteristics.
ColorStock, ColorFactor, AdjustedCansSold
Red, 1
Blue, .5
Yellow, .5
Blue, 3
Red, 1
Yellow, 1
Yellow, 3
When I pull it out completely it hoses up the calculated key figure.
So I either need to be able to remove ColorFactor from the characteristics or figure out a different way to get to the end state that the customer needs. Hopefully this helps. I appreciate your responses thus far.

Similar Messages

  • Averages in a query using a variable with Replacement Path: Replacement wit

    I have two queries. Query1 has a handful of characteristics, one of which is used in a formula where I used replacement path in order to be able to use it in some calculated key figures. I also have a couple of key figures that are not calculated and they are averages.
    The second query has a characteristic value variable that is replaced with the first query. This replacement value variable is placed into the filter section and the characteristic itself is placed in the rows section. I am bringing in the same calculated key figures that were in my first query as well as the normal key figures that are averages.
    The issue I am having is the regular key figures that I am bringing in are coming in summed up instead of as averages. Is it possible to bring the normal key figures in Query1 as averages into Query2?
    There is more information in the thread below if you need more background.
    [Replacement Path and Aggregation;
    PS - I am using 7.0.

    Hi Satyakam,
    In the text variable properties make sure that in the replacment path you have chosen "Text" to appear date as per user setting . Other wise as in your case it must be set to "Key" which always shows in the format YYYYMMDD.
    Hope that helps.
    Regards
    Mr Kapadia

  • Variable with Replacement Path

    Hi, I have two queries. The results of the first one should be the input for the second one. E.g. the first query shows a list of personnel numbers and additional information. These personnel numbers shall be overtaken by the second query. The personnel numbers belong to "Dimensions" in the Query Designer. I alread tried to create a variable with replacement path to the dimension personnel number. I implementet this variable in both the first and the second query (under: "rows"). It`s no "Formular variable" and no "Calculated Key Figure" but a "Characteristic Value Variable" of a Dimension. The problem is now that I cannot execute any of the two queries. The error "Abort the query cannot be released for OLE DB for OLAP. System error in programm CL_RSR_REQUEST and form PREPARE_VQUERIES:INVALID_
    What is my mistake? Thank you in advance! Eve

    Hi Eve,
    It is possible to connect the 2 queries using a Replacement Path characteristic variable. You would need to create the variable on the char whose values you want to pass from Q1 to Q2. The variable will be of type replacement path and you will need to enter the name of Q1 from which it will get the values. Make sure that you include this char in the query definition of Q1 and Q2. In Q2 you will restrict the characteristic using this variable. DO not use this variable (replacement path) in Q1.
    In your query properties check if you have turned on the checkmark for Release for OLE DB for OLAP (3rd tab). If the check mark is there, then remove it.
    We are using the scenario in a couple of places, and it works very well.
    Hope this helps...

  • Creating Variable with Replacement Path to get value from ANOTHER Variable

    Hi all,
        Is anyone has created the Variable with Replacement Path to get the value from another User Entry Variable, PLEASE ? 
    First created the User Entry Variable (ZV_X) and it accepts the date range like '01/01/2009 - 01/31/2009'. Next created the Characteristic variable (ZV_Y) of Replacement Path for which source variable will be ZV_X and we should get the 'FROM Date' (01/01/2009) from the selection (ZV_X) into it (ZV_Y).
    While creating the Characteristic variable (ZV_Y) of Replacement Path, I didn't find my newly created ZV_X variable in the list of available variables under 'Variable' header in 'Replacement Path' tab and it is causing the error 'Source to replace variable ZV_Y is not defined'. How could I create the Characteristic variable of Replacement Path for my requirement, PLEASE ?
    The following is from help.sap..com:
    Replace with Characteristic Value
    Text and formula variables with the processing type Replacement Path can be replaced with a corresponding characteristic value. In the variable editor, on the General tab page, you specify under Reference Characteristic the characteristic that is to be referenced by the replacement. On the Replacement Path tab page, you can choose whether the variable is replaced with the From or the To Value and with the Key or the Name of the characteristic value. You can also specify the Offset Start and Offset Length for the output.
    Replace with Variable
    Characteristic value variables, hierarchy variables, text variables, and formula variables with the Replacement Path processing type can take their values from a different variable.
    The following prerequisites need to be fulfilled:
    Variable
    ●      The variable must not be input-ready
    ●      The variable must represent a single value
    Source Variable
    ●      The source variable must not be a hierarchy node variable
    ●      The source variable must be input-ready
    ●      The source variable must be available in the query
    ●      The source variable must represent a single value or an interval
    In the variable editor, on the Replacement Path tab page, you specify the source variable from which the value is to be determined. The value is either determined from the key, the external attribute of the key, the description, or the attribute value. You can specify an Offset Start and an Offset Length for the output here. The variable is replaced on the variable screen upon each data release.
    Thanks,
    Venkat.

    Hi Eve,
    It is possible to connect the 2 queries using a Replacement Path characteristic variable. You would need to create the variable on the char whose values you want to pass from Q1 to Q2. The variable will be of type replacement path and you will need to enter the name of Q1 from which it will get the values. Make sure that you include this char in the query definition of Q1 and Q2. In Q2 you will restrict the characteristic using this variable. DO not use this variable (replacement path) in Q1.
    In your query properties check if you have turned on the checkmark for Release for OLE DB for OLAP (3rd tab). If the check mark is there, then remove it.
    We are using the scenario in a couple of places, and it works very well.
    Hope this helps...

  • Issue with Replacement path  variable

    Hi all,
    I had created a formula variable with replacement path for this i had created a variable with replacement path and i had used it in the formula but i am unable to get the value of the replaced objects can any one thru some light on this.
    Regards

    yes the ref char having value. another thing do i need to include the char in the row r columns which has been replaced in the formula variable.
    regards

  • Replacement Path: Replacement with a Variable Value

    How I can show the value of a variable entered by the user in the description of the column in the report?
    X and Y are variables entered by the user and reflect the lower limits of the range for count documents
    Example
    Table                              
    0doc_type     Material_type  Purchase_group     < X     => X And <=Y     > Y
    XXX     BBBBB        CCCCCC                         3     4                                          5

    Hi...
    Use a text variable in the column description,
    and use replacement path to show the descriptions as required.
    lets say you have variable 1 and variable 2
    create two text variables with processing type replacement path and select the above variables for each.
    Eg. the descriptions of your columns would be something like this after using text variables
    Total number of documents which are lower than &txt_var_x&.
    Total number of documents which are between &txt_var_x&. and &txt_var_y&..
    Total number of documents which are greater than &txt_var_y&..
    Hope this helps,
    Regards,
    Joe

  • Variable replacement path with another variable

    Hi Guru's
    I'd like to use the functionnality of replacement path from a variable.
    Well, i have variable V_1 which is a basic manual entry variable based on a date infoobject. this variable is not mandatory and accessible.
    And i have the variable V_2 which should be based on V_1 so i created V_2 with a process replacement path and in the replacement tab i put V_1 (i try with the list but i didn't find my V_1)
    But the result is that V_2 is always empty but i have no problem when i check the query
    So do you have any idea ?
    Why i can not see the V_1 in the list of variable from the replacement ?
    I don't want to use by exit. i know that it is possible but i want to use the main simple functionnality for flexibility is maintenance by users.
    Thanks for help
    Cyril

    thanks for your answer,
    svu123, my V_1 variable is of course in a correct status to be used. i made test in first without V_2.
    And when i create V_2 in the first tab i activated correctly the replacement in processing type. if not i can not choose
    the query or variable source and i can not see the list of variables.
    Rakesh, i tried what you answered without results. i check different variables that are available in the list and i have
    lots of different variables (all in ready for input) but i have interval, multiple single values, SAP standard variables my own variable on other fields.
    any other ideas ?
    many thanks
    Cyril

  • Regarding replacement path.. Could you help me please .. ?

    Dear all,
    I have problem when i use variable replacement path, where it replace another variable.
    The scenario is like this:
    I have variable cal. month user input where the type is interval (let say it's called var A).
    Then i create rep. path variable cal. month:
    1. Replace with : Key
    2. Use Interval : From Value.
    I use this rep. path variable for restricted KF.
    When i run the report:
    I fill in the value for Var A:
    01.2003 - 05.2003
    The invalid things are:
    1. Rep. Path variable only get the value 01.2003. The impact the KF is only restricted by 01.2003.
    It supposed to be restricted by 01.2003, 02.2003, 03.2003, 04.2003.05.2003.
    The questions are:
    1. How can i overcome this problem?
    2. How should i do, if i want to use replacement path in restricted KF that can restrict by 01.2003, 02..2003, 03.2003, 04.2003, 05.2003 ???
    Could you help me to suggest what i should do please .. ?
    Really need your guidances....
    Regards,
    Niel.

    Hi Niel,
    When you use a variable(v1) of processing type replacement path and try to replace it wih another variable the replacement is only by single value. This you can find by details tab in the variable(v1) being created.
    Hence you have only options of replacing it wih from value/ to value/ difference.
    I didn't undersand why you wish to use variable(v1) wih processing type replacement path when you could have used the input variable type for restriction of the characteristic in the restricted key figure.
    I think for your requirement variable processing by manual input is more suitable unless you have some reason for replacement which I didn't undestand.
    Thanks and regards,
    Sunmit.

  • Replacement Path with Query

    Dear Experts,
    We are facing problem where we had a query in which we are having the characteristic External Notiifcation and created varaible for the same and this variable is getting replaced with Output of another query i,e the procesing type for this variable is Replacement path.
    We had results for the query which we are using in the replacement path and also the same values exists in the cube on which we built the second query in whcih we are using the Replacement path.
    when we execute the current query,query was not showing any output.Any suggestions would be of great help.
    Regards,
    Sunil Kumar.B

    ok

  • Formula variable of type replacement path not working

    Hi Folks,
    I have created formula variable of type replacement path and replaces with characteristic key.I wanted to use charecteristic infoobjects in coluns so that i have created formula variable for that.But when excecuting the query in web it is not displaying values for that formula.
    Can anyone plz solve this,if u come accross this situation before.
    Thanks and Regards,
    Ravikiran
    Edited by: MRK@SAPBI on Jun 11, 2011 1:13 PM

    Thanks vineet, for your quick reply.
    yes,i have used the characteristic in a row and it is a number.
    Still it is not displyaing values.But i need to calculate the couter for the same formula created on that charateristic and need to put condition in the query.
    thanks,
    Ravikiran

  • A formula with a formula variable with a replacement path delivers X

    A formula with a formula variable with a replacement path delivers X as a result if the characteristic of the replacement is not in the drilldown
    I have Created on ( date ) on which I have a Formula variable . I have used that Formula Variable in my calculated Key figure .
    Now the Problem is If I use Created on in ROW , The calculated key figure works . But if I don't use in Row , The calculated Key figure shows X . Situation is Users don't want to see Created on in ROW .
    If I use in row and hide also , then number of Records  will be same .
    Pls guide me what shoud I do .
    Is this problem related to support pack .

    hi
    i would like to know how to create the replacement path and authorisation variables.
    what are the steps we need to follow in rsa1.
    Edited by: vasu reddy on Apr 9, 2008 11:28 AM

  • Calculation of attribute value(char) using replacement path

    Hi Guys,
    Using Replacement path I am unable to find a attribute which required to replace the char value.
    I have Char Zformat and attibute zstatus(char). I want to create a formula variable to which I want to feed the attribue vale. when I am trying to find attribue, I cant see.
    Please help me.
    Sudha

    Hi,
    r u sure that u r selecting "Attribute value" for Replace Variable With...?
    Hope   u r varible is "formula variable",processing type is "replacement path" and in the next screen u r selecting u r CHAR and in next screen...Replace Variable With "attribute value"...then u can select u r attribute..
    regards

  • Inventory Report-Replacement path for Base UOM to Case and Standrad Cost

    Hi, We have a Scenario as below:
    Question1:
    We have a multiprovider contains 4 infocubes and 2 Master Data objects
    a.Demand
    b.Inventory
    c.Sales Orders
    d.In Transit
    Master Data objects
    a. Material (contains Base UOM to Case as Key Figure Attribute and also Base UOM as an attribute)
    b. Material Location (Contains material as an attribute and also Standard Cost as a Key Figure attribute)
    At the report level two formula variables are defined with replacement path for showing the Base UOM to Case and Standard Cost in columns.
    We have 4 reports on this multiprovider. There is a dialy sales report which gives the following details
    Material, Location, MRP Controller, CalDay, Base UOM, Actual Sales(AS), Dependent Demand(DD), Consumption Qyt(CQ), Base to Case UOM, Standard Cost
    In this report for all the records the Base to UOM and Standard Cost column is coming with values which is nothing but the replacement path on the material master key figure attribute. Though this report is on the multiprovider all the major keyfigures (AS, DD and CQ) are coming from a single cube( this is an observation from myside).
    We have another report which is the Inventory Report with the following details:
    Material, Location, MRP Controllder, Calday, Base UOM,      Unrestricted Inventory(UI), committed Inventory(CI), Back Order Qty(BOQ), In Transit by Sh/Rec(ITS), In Transit Pipeline(ITP), On Order Qty (OOQ), Current Inventory Position (CIP), Quality Inspection Stock(QIS), Block Stock(BS), Base to Case UOM, Standard Cost
    Now in this report for all the records the Base to Case UOM and standrad cost is not showing up. Is there anything which needs to be done in order to get the Base to Case UOM and standard cost for all the records.
    Question2:
    When Non-Cumulative and Cumulative key figures are combined at the multi provider and also at the report level, will there be any problem?
    Regards
    Vijay

    Hi,
    I think you can proceed with virtual characteristics for this.In the code you can truncate the time and you can display on the date:
    Regards
    Prasad

  • Formula Variable with Replacement Path - drillup ref.char and still working

    Hi all,
    I have a requirement, where formula variable (with replacement path) shouldn't work when I remove the reference characteristic from the rows. But this is not the case at the moment
    I have 'Brand' and 'Material' in the rows and there is 'Material Indicator' in the columns. This 'Material Indicator' is a formula and there is formula variable in it with the type replacement path.
    Reference char is 'Material'; Replace with 'Attribute Value' is selected also. As attribute I am selecting one of the attributes of the 'Material'.
    In the report output, I am seeing relevant attribute values when Material is in the rows. But when I remove the Material from the report, I still see the values for this Material Indicator column. But I expect to see blank instead..
    Can you please share your comments?
    Thanks in advance.
    S.P.

    hi,
    Irrespective of the drilldown on Material, the fomula variable will be replaced by material value. This is how replacement variable should behave. You might have to change the design. For  more inputs, let me know your requirement exactly.

  • BW 3.5 - Issue with formula variable with replacement path

    Dear experts,
    I'm facing an issue with formula variable with replacement path.
    Just to clarify, I know replacement paths is raising a lot of questions but I've been using this functionnality extensively in the past, both in 7.0 and 3.5, so I'm not looking for basic information about how to use it.
    I'm trying to setup a simple report that would show total values per plant of Purchase Order < 100 €
    To do so I've setup a calculated key figure as follow:
    VAR1 * ("PO value" < 100 ) * "PO value"
    VAR1 is a formula variable with replacement path on 'purchase order' and value attribute 'constant =1'.
    (The report has to show values summarized by plant but should not show the detail PO by PO, so I'm not looking at a solution based on condition)
    The report as characteristic "plant" in rows and my CKF in columns.
    Now let's take an example. I have 3 POs in Plant 1:
    PO1 -> 150€
    PO2 -> 90€
    PO3 -> 80€
    Because of the variable with replacement path, the result in my query should be:
    plant1 = 170 (even though characteristic "purchase order" is not in my rows, system should evaluate PO one by one and return values only for those two that are below 100).
    But the result coming is 320, which is wrong.
    I've done the same report on many other 3.5 systems and it worked perfectly, and I am not able to get proper support from SAP OSS who keep saying that this functionnality is not ready in 3.5 (although I've provided screenshot of this working on another 3.5 system!!! how frustrating...)
    They have also pointed to problems of Before and After aggregation but that has absolutely no impact. Once again, the scenario is working perfectly on other 3.5 systems with the same query design, so i'm sure it has nothing to do with Query Designer options.
    Would anyone have ever come to an equivalenet problem? I'm wondering whether the DB itself could not play a role in the variable with ref  characteristic 'constant =1' ...
    Any though is welcome!
    thanks

    Hi,
    The text variable is replaced when the exact date is clear for this key figure column according to the restriction.
    To achive this, please make sure that either the variable is directly restricted in the key figure selection, or that the date characteristic is in drilldown.
    Regards,
    Patricia

Maybe you are looking for