Wednesday, August 15, 2012

Replacement Path


Replacement path processing type is used in a variable when you wish to get a value from attributes of another character or from a query.

Example:- if you wish to display the age of a customer in your report which will not be in the cube. I mean Age is attribute of customer and not part of the cube. But each transaction record in the cube is assigned with a customer field. So if we want to get this value into our report .. we create a variable on customer with replacement path and use its attribute AGE . So when you use this variable in your query for any thing you get the age of the customer associated with that transaction data.


One use of the Replacement path variable is as highlighted by Riccardo (formula variable).

Other than that Replacement path variables of type Characteristic variable replace the results of a query in the variable ad are used in Result Set scenario queries. So if you have such a variable on material, Query1 will supply a list of Materials to Query2.

Replacement path variables are also used to enhance the column headings as Text variables. Eg, A text variable created that will put the text for each month on the column heading.

Characteristic Variable with Replacement Path on Query
While working for TOP-N Vendor Report I encountered the need of Replacement with Query
We already have Report to Calculate TOP-5 Vendors of the Year, and recently I got new requirement to update this report for analyzing the TOP-5 Vendors of the year over all the months of the given year. I tried simple approach by creating multiple selections for all the months individually in Columns, and created condition of TOP-5 for all the months. But it didn’t work in the way I was expecting. It included TOP-5 Vendors of each month individually, which added some new vendors to analyze in my report. Then I tried the same solution with the Replacement Path on TOP-5 Vendor Query (which I was already having in my system), and finally it worked fine for me.
Below is the detailed explanation of the scenario that I discussed and the problem I faced with the alternative approach, and how it solved with the approach of Replacement Path on Query:


No comments: