Skip to Content
author's profile photo Former Member
Former Member

BEX calculation of Average Month Unit

Hi,

Could you help me on identifying a solution for our report computation for average of month units? The need is to get the YTD units and divide it by the month of the date parameter. So its Average month units = YTD unit / month

For example:

the date parameter selected is for May 15, 2014 (05/15/2014)

YTD unit is 7,000

The average month unit is calculated as 7000 divide by 5 = 1,400 units.

How could we get the month based on the date selection so that we can use it for the calculation of the average month unit?

Hope you can help.

Thank you.

Add a comment
10|10000 characters needed characters exceeded

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Sep 25, 2014 at 09:29 AM

    Hallo Anne,

    Yes, such requirement can achieve via formula variable.

    you can write simple code to read input variable date for the query.

    get the month out of date and pass it to formula variable.

    this formula variable you can use in formula for Average Month unit = YTD units / formula variable(that will pass month value from input variable).

    You can create formula variable on date field.

    Hope you get hints from this.

    Thanks

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 24, 2014 at 11:19 AM

    Hi

    following is a beautiful document and i think this can help you.
    Please refer below:"

    YTD Based on Fiscal Year Period without cmod code

    thank you

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi,


      Thanks but We already have the YTD units value. Our problem is to get the month number of the date selection. example is user input date is May 2014. We need to get the value of 5. if user input september the value we need is 9. We need the number value so that we can use it as part of our division formula. What we need to get is the Average month units.


      here is the formula for average month unit is equal to YTD units (which we already have) divide by month number based on date selected (which is our problem on how to get it right now, so that we can use it to divide the YTD unit).


      Thanks.

  • author's profile photo Former Member
    Former Member
    Posted on Sep 25, 2014 at 04:13 AM

    hi,

    Please create formula variable of type replacement path, read the input variable date and calculate month in the formula variable and use this in the calculation.

    Average month unit = YTD units * formula variable.

    regards,

    Arvind.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 24, 2014 at 10:58 AM

    Hi,

    This is a common requirement for calculating YTD.

    You can use Customer Exits variables for calculating month based on input date range.

    The documents for using exits are available in SCN.

    Hope this helps.

    regards,

    Vikrant

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi,

      Thanks but We already have the YTD units value. Our problem is to get the month number of the date selection. example is user input date is May 2014. We need to get the value of 5. if user input september the value we need is 9. We need the number value so that we can use it as part of our division formula. What we need to get is the Average month units.

      here is the formula for average month unit is equal to YTD units (which we already have) divide by month number based on date selected (which is our problem on how to get it right now, so that we can use it to divide the YTD unit).

      Thanks.

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.