Skip to Content

Bex query: formula variable using Replacement path

Bex Query: Formula variable using Replacement Path:


We can create formula variable at the bottom of the available operands (key figures listed).

Then assign it to a calculated key-figure or local formula.






Requirement1: To calculate Sales per No. of seats.


Sales value is coming as key figure

No. of seat(characteristic) is attribute of Profit Center and has data-type as NUMC length (4).

We can not use characteristics in the calculated key figures or in the local formula.

and We need to get the attribute value characteristic value of Profit Center (0PROFIT_CTR).

We will convert it into number using formula variable.

We have selected ref. char. as Profit Center and attribute as No. of Seat.








No of seat has mapping with profit center. We will do exception aggregation with profit center.

Now we can use this CKF to get Sales per Seat.





Output1: /wp-content/uploads/2013/04/slide27_212301.png

If we use result as summation for Sales per seat, result will be like below:








Another Scenario: Requirement2:


         To get term in days = Maturity date(End of Term) – Start date. Where dates are available as characteristics.

         We can create formula variable using replacement path and data-type as date. Create one formula variable for Maturity date and one for Start Date.

         Note the info-object in the reference characterisitcs of general tab.

         for e.g.: total term period, remaining term period can be required in case of Insurance where we have Maturity date,

         start term date, As-of date(evaluation date).


/wp-content/uploads/2013/04/slide07_212211.png   /wp-content/uploads/2013/04/slide08_211737.png




Either create Calculated key figure or create a local formula (key-figure Section) to get term in days.










  In   In Requirement1: we have converted info-object:attribute value to number,

        In Requerement2: we have converted Info-object:key value to date.


        thanks& regards,







You must be Logged on to comment or reply to a post.