Skip to Content

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,







To report this post you need to login first.


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

  1. Former Member


    Thanks for sharing!

    I’ve tried the requirement nr 2; convert Info-object: key value to date, it works as long as the corresponding Characteristic are displayed in the table.

    Is it possible use the local formula “Term period (days)” aggregated in, for example; Total Sum by Company Code (without having the details of “Start of Term” and “End of Term” displayed in the table)?

    A similar set up (using the replacement path key value of a date characteristic as number) was working for us using bw version 7.0, recently we have upgraded to version 7.4 where the aggregation is not working anymore.



  2. Former Member

    Dear Gurus,

    I have same situation but I want to calculate “” but I don’t want to show Profit Center in report.

    Do you have any solution for this cases?





Leave a Reply