Average Calculation for Available Data only

Hello Gurus,
I have a requirement where I have to calculate Daily average based on Hours (24 hours). We get one reading for every hour. SO 24 readings and divide them by 24. It works fine when I do a calculation like ([Measure]/24) as Hours would always be constant.
The problem comes when we miss some readings for few hours. In that scenario User do not want to take those hours into consideration for which reading is missing.
How can I achieve that?
Any suggestions?
Regards
Shalini

Hi,
Try this formula.
=sum([Measure])/count([Measure]) where ([Measure]>0)
or
=sum([Measure])/count(sum([Measure]) where ([Measure]>0))
Amit

Similar Messages

  • TS3899 i receiving my gmails with 15+ minutes delay. this is because no option for "push" data, only "fetch" for gmail account. How can fix that?

    I receiving my gmails with 15+ minutes delay. this is because no option for "push" data, only "fetch" for gmail account. How can fix that?

    Sign up for Google's paid Apps for Business service, you can then set things up using Exchange & you'll get push using Gmail. Otherwise, you can't get push using Gmail.

  • Dynamic Date Calculation for Current Date - 1

    I am trying to create a variant with a dynamic date calculation attribute.
    I am following the instructions as they are posted to the web but I get an error message.
    I want to get all data EQ to the current date -1
    In the object for selection screen I enter a D for Selection Variable, for Name of Variable I enter an I to include specific values and the option EQ for current date +/- ??? days.  Then I enter 1- for the number of days.  I have tried to enter this many times and in many ways but it doesn't work.  I keep getting this message "lower limit of interval is greater than upper limit"

    Hi,
    Welcome to SDN.
    Selection-screen has four values -
    SIGN
    OPTION
    LOW
    HIGH
    Pass your date value in the option low for the screen.
    Sign you have already pass as I and option as EQ.
    Regard,
    Amit
    Reward all helpful replies.
    Can you paste your code here.
    Message was edited by:
            Amit Khare

  • Workday calculation for specified date range

    Hi All,
    How to count number of workdays available for given date range. And I tried below statement which is
    not working.
    SUM(CASE [Calendar].[Calendar Date]
        WHEN [Calendar].[Calendar Date].[Year] = '2005' AND [Calendar].[Calendar Date].[Month]
    = 1
        THEN [Calendar].[Calendar Date].CURRENTMEMBER.CHILDREN
        END
    , [Measures].[Work Day Flag])

    Hi bpbhhaskar,
    According to your description, you want to count the weekdays in MDX. Right?
    In this scenario, we can just aggregation days from Monday to Friday. The key should be 2 to 6. Please use the expression below:
    with
    MEMBER [Measures].[DayCount] AS
    Count
    Descendants
    [Date].[Calender].CurrentMember
    ,[Date].[Calender].[Date]
    * {[Date].[Day Of Week].&[2]:[Date].[Day Of Week].&[6]}
    Best Regards,
    Simon Hou
    TechNet Community Support

  • New calculation for availability check in sales order

    Hi there,
    When a sales order date and hour are changed the system doesn't calculate the new availability date, it maintains the initial one. Does anybody knows if it's possible to calculate it automatically?
    Thank you!!

    Hi,
    I have a doubt..why system should perform ATP check for labour?
    I am assuming because you have mentioned hours.Secondly which date you are changing the requested delivery date?
    Kindly clarify the doubt.
    Regards,
    Amrish Purohit

  • Average value for a Date Field in an OO Alv Grid.

    Hi Abapers.
    I've been searching for some info about averages in OO Alv grid lists but cannot find an answer to what I'm really need. The question is that, for getting an average, a 'C' value must be set in the field DO_SUM of the fieldcatalog structure for a field.
    Now, the problem is that I need the average of a date field (in 'normal' date format). I've tried it several times and read a lot of things but cannot find a real answer: Could it be done the average of a date field (e.g. for dates 01.05.2009, 02.05.2009 and 03.05.2009 the average is 02.05.2009).
    Best Regards.

    Hi,
    It will come along with the standard tool bar.For number fields, you can see it(Mean).

  • Average Calculation for the Dynamically Changing Columns

    Hello Experts,
    We have to design the following scenario in a query in the query designer.
    Variable Selection = 0CALMONTH Range Value
    The Report Data should be as below
    For Example: 0CALMONTH = MONTH1 to MONTH3
    MONTH1--MONTH2--
    MONTH3
    Statistical Forecast %-- A%B%--
    C%
    MAPE--(A%B%C%)/3(A%B%C%)/3--
    (A%B%C%)/3
    For Example: 0CALMONTH = MONTH1 to MONTH5
    MONTH1--MONTH2MONTH3MONTH4--
    MONTH5
    Statistical Forecast %--A%B%C%D%--
    E%
    MAPE--(A%B%C%D%E%)/5(A%B%C%D%E%)/5----(A%B%C%D%E%)/5   .............
    In this report the number of columns will be dynamically changing depending on the 0CALMONTH range value and we need to calculate the MAPE value which is equal to the average value of Statistical Forecast %.
    Can someone please provide me the inputs on how to calculate the MAPE value for the dynamically changing columns.
    Regards,
    AVS Reddy

    Victor,
    I have this code here
    AVG(DESCENDANTS(COSTCENTER.H1.Currentmember,1))
    Working for me right now, without using the second parameter on the AVG function, and 1 for te descendants, and the first decendants of the current acount are not the base level of the hierarchy.
    And if you need to specify the lowest leves to get it to work something is wrong.
    Use the formula above and try optimizing you application.
    Best
    Leandro

  • Is Workspace Manager the right solution for history data only

    I've been experimenting some with WM to just enable history on all tables in a application we have with about 100 tables.
    Everything works fine, except for the fact that we have lots of fk_constraints that require enabling of versioning in order.
    We know that changes to the Db layout will occur as the app develops with business requirement's.
    My questions is : Is WM the right solution here, as I don't see anyway to "transport" historical data in the event of a migration of old DB layout to a new layout?
    (db refactoring).
    /christian

    Hi Christian,
    When you execute enableversioning on the tables, you can specify the complete set of tables that you want to version, instead of having to maintain the correct table order.
    There shouldn't be a need to transport the data between tables. We support DDL changes on versioned tables by using the beginDDL/commitDDL procedures. If you do require the transport of data between databases, then note that we only support a full database import/export. The user guide covers both of these topics in greater detail.
    Regards,
    Ben

  • Seagate ST8000AS0002 8TB 5900RPM 128MB Cache SATA3 - for Backup Data Only. Are there any compatibility issues with an older  3,1 Apple Mac Pro 8-Core 2.8GHz (4-Core x 2) ?

    Finally mass storage drives are being released. The Seagate ST8000AS0002 8.0 TB 5900RPM has just been released in Australia and I was advised to check on any compatibility issues, being that my 3,1 Mac Pro is an old, but working fine machine.
    I have read there are possible issues with using HDs greater than 2TB with the MP 3,1 . But checking with OWC, they say the Seagate 4.0 TB Solid State Hybrid Drive is compatible for use with the MP 3,1.
    So can the hardware and operating system handle an 8.0 TB of this sort ?

    The problem is with formatting the large disk. The Mac can see and use them if formatted for a Mac
    Format large disks
    That bug appeared in 10.8.4, and has not yet been fixed.
    using a Disk Utility from any older Mac OS X, including the 10.6 DVD (if your Mac can boot from it) or any saved Installer DVD or thumb drive will work.
    Another work-around is to move that drive to an external enclosure and Erase it there (provided your enclosure is modern enough to deal with drives over 2.2TB.

  • How to change availability date of a batch when doing GR for order in MIGO

    Hi all,
    We are not able to find any exit or BADI to change availability date of batch when doing goods receipt for a order.
    Exits and BADIs are available for other dates but not for availabiliy date.
    One Exit that is available for available date but is not triggered while doing GR for an order.
    Please let me know how to achieve this.
    Thanks and Regards,
    Taranam

    Hi,
    You can use the remodelling here with the option " Replace Characteristics" with Customer exit. It will allow you to write an exit and change the value. Find more here:
    http://www.scribd.com/doc/7882193/Remodeling-in-BI-70-Using-Customer-Exit
    Thanks...
    Shambhu

  • Recurring document - FBD1 with incorrect due-date calculation for AP

    Hi Gurus,
    in our ECC 6.0 system we are creating with F.14 FI-documents (SAPF120) based on recurring documents (created with FBD1) for various purposes (e.g. Recurring entries for IC-business).
    Therefore it's important that the system provides in the final processing of the recurring documents the correct net-due-date in the AP-document based on the document date and the payment term included in the AP-masterdata (LFB1-ZTERM).
    Problem:
    The processed FI-document contains the correct payment term but the calculated net-due-date with regards to the document date (BKPF-BLDAT) isn't correct. A Dummy-Update of the FI-document with FB02 on field BSEG-ZTERM provides finally the correct net due date but this a not recommended solution.
    Any ideas how to solve that issue???
    Thanks for replies.
    BR, Bernd

    Hi Vishnu,
    the defined payment term is
    fix day: 15
    additional month: 1.
    Default for baseline date is posting date
    Therefore the expectation is that net due date is calculated for posting date
    e.g. : 01.02.2012 to 15.03.2012.
    The line item after processing in FI-document shows :
    Posting Date : 01.02.2012
    Bline Date:   01.02.2012
    Days/percent: 35
    Net due date: 07.03.2012 (dd.mm.yyyy)
    That's wrong according to my understanding of the payment term definition.
    BR, Bernd

  • VA01 change Delivery and Material Staging/Availability Date when vacation

    Hi Gurus,
    When I create a new order in VA01 for a day my company is on a period of vacation, I would like to change automatically the Material Staging/Availability Date and Delivery date to the last working day before vacations to avoid late deliveries.
    I am trying to find the custo point where to do it, but I don't find it. Do you have any suggestions?
    Thank you in advance.

    Thanks Andy,
    We maintain the factory calendar, so the problem is how the system is calculating this availability date.
    For example, if we have a week of vacation and we get an order for Wednesday, the system calculates the first day after this vacation week as the day we can deliver the product. In our example would be on next Monday.
    What we would like to do is that the system calculates as a delivery date the last working day before the vacation week, in our example would be on the previous Friday. So then we can avoid those late deliveries we are having now.
    I don't know how or where to customize that.
    I accept any suggestions.

  • GL assignment for future date?

    Hi everybody,
    We have an issue is as follows:
    - We have created a sales order for 08-09-2008
    - We have created PO for 08-09-2008, here system will able to post everything fine.
    - Again we are creating one more PO for 08-09-2009, here system threws error message like GL a/c needs cost assignment.
    My question is why system is asking assignment for future date only and why system is not asking assignment for current date?
    Looking forward your best thoughts
    regards
    vk

    Hi Raj,
    Thanks for your reply
    Yes, we have assigned only cost element in TC: OKB9. But, for that cost element we have created 2 analysis periods.
    - GL 100115            01.01.2008 to 31.12.2008
    - GL 100115            01.01.2009 to 31.12.9999
    I think validity period is perfect still system threws error message like gl acc needs cost object assign.
    regards
    vk

  • Cross Tab export : Excel Data Only - Row headings are *bottom* aligned?

    Hi All,
    Having a problem with Crystal 11 / BOXI.
    I have a Cross Tab working fine that has four Row groupings (labels on the left).
    In Preview mode, it looks as expected. Row #1 label appears on line 1. Row #1 label shows blank on line 2,3,4 etc until it is ready to change.
    The organization of the Row group is further made clear by a nice box that spans multiple rows. The Row label appears at the TOP of this box as you might expect.
    In Excel-Data Only format, there is a problem. (I saved, scheduled, and ran on BO XI Enterprise CMC console.) The Excel file shows the Row 1 labels without any box (that's OK as it is "data only") however the text is bottom aligned. So the first label does not appear until the final row of the grouping.
    Same thing is happening with Row 2, 3 groupings, they are all bottom aligned.
    It's confusing for the users who would expect the Row grouping labels to be all top-aligned.
    I have searched the forums and support site and read all technotes. I also tried several things including:
    Format Field for Row#1 Name, choosing Left/Right/Center horizontal alignment (where is the same for vertical??)
    Within BO Enterprise, try combinations of options under Excel - Data Only : export formatting, maintain relative object position, maintain column alignment, use options saved with report, etc.
    Any ideas? Is there a way to force a top-alignment programmatically, for Excel Data Only output?
    Help appreciated !
    Rob McCauley
    Cognex
    Natick, MA 01760 USA

    I found the answer to this question with help from SAP Support.
    In the Cross-Tab Expert, Customize Style tab, click "Column Totals on Top".
    Then, the Excel Data Only report will show the row titles Top-aligned for the row group.

  • Calculating Average stock for the given period

    Hi,
    I need to calculate the average stock based on given date range given by user.
    Total stock is also calculating in report only. So it wil get divide by differnce between the date range.
    How can we do that?

    Using formula variable you can find difference between 2 dates .
    -create two formula variables for 2 dates .
    -create a formula to differenciate them
    -create formula variable and divide that by stock it will give the average stock ..
    some example ..
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/30f15839-0cf1-2b10-c6a7-ebe68cc87cdc?quicklink=index&overridelayout=true
    Ravi

Maybe you are looking for