Calculating sums by time

Hi. I need to know how can I calculate sum by date and time. I've got collection with date column, time column, value column and sums column with label in it . I tried in sumsColumn-label1 Text= Sum(Filter(Collection, dateColumn<=ThisItem!dateColumn),
TimeValue(timeColumn)<=TimeValue(ThisItem!timeColumn), valueColumn*1). This doesn't work. It works great with datum but not with time so if I have two values at same date it sums both values. I want that sums column calculate sum continuously by each value
so that's why I added time column. Please help. Thanks

Hi Ptr,
I believe you want to calculate a cumulative sum per Day. If I use your example, you start with 3 rows:
10 | 1/1/14
15 | 2/1/14
15 | 2/1/14
And you want to display the total sum in the gallery to see something like this:
(1st item in Gallery)       (2nd item in Gallery)          (3rd item in Gallery)
1/1/14                           2/1/14                             
2/1/14
10                                 25                                    40
One possible way to accomplish this is to add another a column to your original data called Index and make sure the first index is the oldest entry and the largest index is the most recent. Something like:
10 | 1/1/14  | 1 
15 | 2/1/14  | 2
15 | 2/1/14  | 3
Once you have this, you can then set the Text property expression of your label inside the Gallery to:
      Sum(Filter(Collection1, Index<=ThisItem!Index), Amount)
Alternatively, instead of creating an Index column, you create a new column that combines Date and Time together into a single column
DateTime. If you use Excel make sure to format all cells of this column to a Date type (e.g. 3/14/12 1:30PM). In Siena, the expression would then become:
      Sum(Filter(Collection1, DateTime<=ThisItem!DateTime), Amount)
Cheers,
Olivier

Similar Messages

  • How do I create a 1d array that takes a single calculation and insert the result into the first row and then the next calculation the next time the loop passes that point and puts the results in thsecond row and so on until the loop is exited.

    The attached file is work inprogress, with some dummy data sp that I can test it out without having to connect to equipment.
    The second tab is the one that I am having the problem with. the output array from the replace element appears to be starting at the index position of 1 rather than 0 but that is ok it is still show that the new data is placed in incrementing element locations. However the main array that I am trying to build that is suppose to take each new calculation and place it in the next index(row) does not ap
    pear to be working or at least I am not getting any indication on the inidcator.
    Basically what I am attempting to do is is gather some pulses from adevice for a minute, place the results for a calculation, so that it displays then do the same again the next minute, but put these result in the next row and so on until the specifiied time has expired and the loop exits. I need to have all results displayed and keep building the array(display until, the end of the test)Eventually I will have to include a min max section that displays the min and max values calculated, but that should be easy with the min max function.Actually I thought this should have been easy but, I gues I can not see the forest through the trees. Can any one help to slear this up for me.
    Attachments:
    regulation_tester_7_loops.vi ‏244 KB

    I didn't really have time to dig in and understand your program in depth,
    but I have a few tips for you that might things a bit easier:
    - You use local variables excessively which really complicates things. Try
    not to use them and it will make your life easier.
    - If you flowchart the design (very similar to a dataflow diagram, keep in
    mind!) you want to gather data, calculate a value from that data, store the
    calculation in an array, and loop while the time is in a certain range. So
    theres really not much need for a sequence as long as you get rid of the
    local variables (sequences also complicate things)
    - You loop again if timepassed+1 is still less than some constant. Rather
    than messing with locals it seems so much easier to use a shiftregister (if
    absolutely necessary) or in this case base it upon the number of iterations
    of the loop. In this case it looks like "time passed" is the same thing as
    the number of loop iterations, but I didn't check closely. There's an i
    terminal in your whileloop to read for the number of iterations.
    - After having simplified your design by eliminating unnecessary sequence
    and local variables, you should be able to draw out the labview diagram.
    Don't try to use the "insert into array" vis since theres no need. Each
    iteration of your loop calculates a number which goes into the next position
    of the array right? Pass your result outside the loop, and enable indexing
    on the terminal so Labview automatically generates the array for you. If
    your calculation is a function of previous data, then use a shift register
    to keep previous values around.
    I wish you luck. Post again if you have any questions. Without a more
    detailed understanding of your task at hand it's kind of hard to post actual
    code suggestions for you.
    -joey
    "nelsons" wrote in message
    news:[email protected]...
    > how do I create a 1d array that takes a single calculation and insert
    > the result into the first row and then the next calculation the next
    > time the loop passes that point and puts the results in thsecond row
    > and so on until the loop is exited.
    >
    > The attached file is work inprogress, with some dummy data sp that I
    > can test it out without having to connect to equipment.
    > The second tab is the one that I am having the problem with. the
    > output array from the replace element appears to be starting at the
    > index position of 1 rather than 0 but that is ok it is still show that
    > the new data is placed in incrementing element locations. However the
    > main array that I am trying to build that is suppose to take each new
    > calculation and place it in the next index(row) does not appear to be
    > working or at least I am not getting any indication on the inidcator.
    >
    > Basically what I am attempting to do is is gather some pulses from
    > adevice for a minute, place the results for a calculation, so that it
    > displays then do the same again the next minute, but put these result
    > in the next row and so on until the specifiied time has expired and
    > the loop exits. I need to have all results displayed and keep building
    > the array(display until, the end of the test)Eventually I will have to
    > include a min max section that displays the min and max values
    > calculated, but that should be easy with the min max function.Actually
    > I thought this should have been easy but, I gues I can not see the
    > forest through the trees. Can any one help to slear this up for me.

  • Cess on TDS is not calculating at the time of posting F-47

    Dear All,
    Cess on TDS is not calculating at the time of F-47 (vendor Down payment Requst)
    Mean system is deducting TDS amount only, not deducting Cess amount on TDS . at the time invoice posting Cess & TDS calculating in this company code (1111)
                But in other (2222) companycode,system calculating cess on TDS at the time F-47 . both company codes under the same system. if we apply perticular notes on above issue is there any affect to other (2222)company code settings ?
    Plse give me advise urgant.
    Raja

    Hi
    In the withholding tax settings Define Withholding Tax Type for Invoice Posting
    and Define Withholding Tax Type for Payment Posting for CESS ,check whether you selected in <b>calculation part</b>: tax amount as base for calculation and selected inherit base.
    If this is not done system will not calculate the Cess.
    Regards
    Aravind
    Assign points if useful

  • Varinace calculation taking more time

    Hi,
    When calculating the variance through T.Code KKS1, it is taking longer time for variance calculation. Previously time taken for variance calculation was not so much even when there were similar number of production orders being processed. Could you please comment on the possible reasons for this.
    Please reply at the earliest.
    Thanks and regards,
    Priyajit.

    Hi Jigar,
    No there is no dump being generated. We are using version 4.6 C.
    What could be the probable reason please comment.
    Thanks and regards,
    Priyajit

  • BPC 10.1 - no sum on time dimension

    Hi,
    we've a BPC 10.1 sandbox and we're facing several problems
    #3 no sum on time Dimension
    If you check the attached file you will see that there is no summing up on the time Dimension. I've checked that on BPC 7.5 and 10.0 and it should work on 10.1 as well but it doesn't ... e.g. Account Dimension works fine
    Any idea or hint?
    Thx

    Yes
    We used the "BPC_HANA_MIGRATE_FROM_10" as well

  • Sum of time formate

    id time
    1 1.20
    2 2.30
    3 4.20
    4 5.30
    5 1.00
    result expected = 14:40 or (if AM/PM so result=???)
    how can i calculate the sum of time ???
    please give me some fast tricks of handling date/time formate in oracle....

    942425 wrote:
    id time
    1 1.20
    2 2.30
    3 4.20
    4 5.30
    5 1.00
    result expected = 14:40 or (if AM/PM so result is ???)
    how can i calculate the sum of time ???
    please give me some fast tricks of handling date/time formate in oracle....Hi,
    First you post in wrong forum. Please post at PL/SQL
    Before posting there close it and mark as answered.
    if your time is number data type then you can try this
    SELECT SUM(NVL(ROUND(TRUNC(DAC_OT_HOUR)+((TO_NUMBER (SUBSTR (DAC_OT_HOUR, INSTR (DAC_OT_HOUR,'.',1,1)+1)))/60)),0))
    FROM DA_CHECKHope this helps
    Hamid
    Mark correct/helpful to help others to get right answer(s).*

  • Calculating Round Trip Time from Non-Spatial Log Data

    Hi,
    I have a log table which holds the vehicles' "entrance" an "exit" dates (dd.mm.yyyy) to/from regions like that:
    VEHICLE_ID REGION IN_TIME OUT_TIME
    1001 CUST_A 01.01.2007 03.01.2007
    1001 CUST_B 05.01.2007 06.01.2007
    1002 CUST_C 04.01.2007 06.01.2007
    1001 BASE_A 08.01.2007 11.01.2007
    1002 CUST_D 11.01.2007 12.01.2007
    1001 CUST_A 15.01.2007 15.01.2007
    1001 CUST_F 18.01.2007 19.01.2007
    1001 CUST_A 19.01.2007 20.01.2007
    1002 CUST_E 16.01.2007 19.01.2007
    in fact, this table was created for reporting "average wait time on each customer" but then i calculated "round trip time" by assigning "base region" ( vehicle round trip starts from "base region" then comes back to here, etc.. ) and creating some rules like "if it passes from CUST_A and CUST_D, it is 'ROUND TRIP A'"..
    vehicles' voyage report is like that :
    TRIP STARTDATE ENDDATE
    TRIP_A 01.01.2007 13.01.2007
    UNDEFINED 13.01.2007 16.01.2007
    TRIP_B 16.01.2007 02.01.2007
    now, trips are more complicated and i want to use spatial mechanism. any advise?
    thanks,
    Cihan.

    Stephen Rodriguez wrote:You don't need to worry about the round trip between the AP and WLC.  Just make sure the phone to phone is goodHTH,
    Steve
    Please remember to rate useful posts, and mark questions as answered
    Thanks Steve,
    That makes Sense, as post authentication the phone to phone would be ofcourse less than 150ms when the traffic is locally switched.
    But I dont understand why the recommendation in the D&D guide "Roundtrip latency must not exceed 300 milliseconds  (ms) for data and 100 ms for voice and data between the access point  and the controller"
    I think it is applicable if the traffic is centrally switched?? or is there more to it, for roaming perhaps?
    Thanks
    Jino

  • Sum up time?

    How do I sum up time, eg, 7:56 + 5:28 + 1:40 (minutes:seconds) in Numbers?

    Louise,
    You should be aware of the types that Numbers recognizes.
    there are strings just letters and numbers and symbols:
    e.g.:
    Wayne, or Hi there, or "123 Happy Street"
    There are numeric values:
    e.g.:
    1, or , 1000, or 56.654, or 3.14159265, or -90
    There are Date/Time values:
    1/1/2012 2:09 AM, 5/6/1999, or 5:56:22 PM
    In the last two cases even if you do not enter the "other" part numbers will add it.  That is if you type "5/6/1999" only, then Numbers will add the time you entered the date.  A date/time value will always include both even if you did not enter the other part.
    There are Durations, which are the difference between two times.  Technically, you cannot add times (when they are a date/time value).  Ask yourself how do you add "1/2/2014 5:45:09 AM" to "4/6/1980 12:31:00 AM"?
    you can however get the amount of time that has passed from one time to another... this is called a duration.  Durations can be added and subtracted.  Elapse time is really a duration expressed in weeks, days, hours, minutes, seconds, milliseconds.
    I hope this helps you understand SGIIIs post.
    you enter durations as "3h 45m 21s" or "6w 3h 2m 1s" (you would leave out the double quotes) 
    Here is an exapmle where I entered some durations and added them up:
    A6=SUM(A2:A5)
    this is shorthand for select cell A6, then type (or copy and paste from here) the formula:
    =SUM(A2:A5)

  • Sum of Time "Hours & Minutes" in stardard list

    Hi,
    in list where it's possible to have a sum of time (as in my case transaction IW47, list of confirmation time), I can make as usual the sum of time but the system let separated hours from minutes having as result e.g.:
    32 hrs
    412 min
    is there any standard possibility to sum them in only 1 unit of measure?
    Thanks.

    sorry, but is not a SAPGUI question. you should ask this in the proper functional area or in the ABAP forum.

  • Finding sum for time field in alv

    hi gurus.,
              i need to find total hours.. i am using field of data type 'TIMS' ... i converted the value to decimal in ALV and founfd total hours .. i need the total hours in Time format .. how can i achieve this in alv .. its very urgent ...
    thanks&regards.,
    S.Sivakumar

    Hi Shivakumar,
    I suggest you not to convert TIMS to Decimal
    because it won't give you correct result..
    Eg...
    Time1 = '11:56:32'
    Time2 = '11:50:10'        
    now add these two times...
    u will get the sum of these as 23:06:42
    but in real life... you want the result as 23:46:42
    So the better way for getting accurate result is to convert this
    HH:MM:SS to Seconds
    and then sum these seconds
    then again convert it to HH:MM:SS
    1 hr = 3600 sec
    1 min = 60 sec
    Hope it will solve your problem...
    Reward points if useful...
    Thanks & Regards
    ilesh 24x7

  • How can I tell if time machine is actually backing up properly when the calculation of estimated time left is incorrect.

    I have recently bought a reburbished iMac ( installed with Mountain Lion) and successfully transferred the content of my old imac ( snow leopard) using migration assistant. This onlt took an 1.5 hours.
    I have noe connected up an external USB drive and started a time machine back up to back up 200GB of content.  It has been running for 12 hours and says 4.63 GB of 200 has been done. Now I know that this calculation is not reliable and USB can get choked but how do I know if the process is actually running ok and how long to wait before giving up. The time machine icon is moving around.
    Please please any help would be appeciated - I want to get using my new Mac.
    thanks
    Susie

    See D2.
    Time Machine Troubleshooting
    Time Machine Troubleshooting Problems

  • Calculation of SLA times based on Service Organization

    Is it possible to calculate the SLA times based only on Service org?
    a) Using Service contracts i.e create SC with only org and assign the Service & Response profiles.
    Else as mentioned below.
    Please give your more thoughts.
    I maintain the Service & response profiles at "Maintain Availability and Response Times" .
    Can I access these values directly in the BADI ?
    My scenario is
    a) An agent belongs to a service org.
    b) I define these Profiles seperately for each Org (Org1 Org2 etc) at the above tcode.This manual entry.I know we dont have org to profiles mapping in the above tcode.I just painly maintain.
    c) In the BADI i check the org entered in the complaint.
    d) for Ex if the Org1 is entered I want to access the profiles for Org1.If else ladder.
    e) then use these profiles to calculate the SLA times.
    f) then save the document.
    g) Also trigger an e-mail saying the above time lines.
    Is the above flow possible??
    Let me know if you want me to post this onto another thread.
    Thanks
    amol

    Shalini,
    I will be just maintaining the service and response profiles in the "Maintain Availa..." tcode.
    There wont be exact mapping stored in any table.
    My logic would be ,i dunno whether this right or wrong..
    1) Once i get the Org ,I would compare like ths
    if( orgdata = org1)
    then service profile 1 etc.
    2) then apply the profiles to the cal of SLA times.
    I think we can achieve what you said using CRM_ORDERADM_I_BADI
    Or we need to use the BADI's specifically mentioned for serv contract det and calculation of SLA.
    As you know in SAP for SLA times we need to have the service contract for a) customer b) org  and many other parameters.then to this SC we need to associate the service and response profiles.When the SC is determined in a complaint ,the serv and resp profiles will be used to get the SLA times.
    But my requirement is to have determine the SLA times based on the service organisations.Not based on the customer and any other parameters.
    For ex : If my serv org is in India the times would be diff ..if my serv org is in US the times would be diff.
    So let me know what approach would be best ?
    Use BADI's as above or does this approach of having define different Service contracts (without having Partner functions customer etc) for diff orgs?
    Thanks
    Amol

  • Issue in new macro calculating values in time series in CVC

    Hi friends.
    I'm new in APO.
    I have a problem with a new macro in CVC which calls up a FM to calculate and store data.
    This new macro calculates the selected data in time series (TS) and e.g. we select 3 days to make calculation with this macro, the first selected day in TS is ignorated.
    We created this macro to do this calculation when user enter some manual values and want it to be calculated in the deliver points in CVC, by TS.
    This macro calls up my Z function which internally calls up a standard FM '/SAPAPO/TS_DM_SET' (Set the TS Information).
    Sometimes, this FM, raises error 6 (invalid_data_status = 6), but only when I user 'fcode_check' rotine together.
    After that, we call the FM '/SAPAPO/MSDP_GRID_REFRESH' in mode 1 and 'fcode_check' rotine in program '/sapapo/saplmsdp_sdp'.
    Firstly, I thought it could be dirty global variables in standard FM so I put it inside a program and called it by submit and return command. But now I think could not be this kind of error because it did not work. And inverted the results, and now only first line os TS get storted and change in CVC.
    It's a crazy issue. Please friends. Guide me for a solution!
    thanks.
    Glauco

    Hi friend. Issue still without a correct solution yet.
    A friend changed the macro adding another step calling the same function. Now this macro has two calls in sequence to same FM. Now it's working, but we can't understand why it's working now.
    It's seems like dirty memory in live cash.
    Nobody knows how to solve this!
    Glauco.

  • How To stop the Security Deposited Calculation at the time of move out.

    Hi Guys,
    I am working on this issue from last week still unable to stop the calculation of SD in Final bill at the time of Move out, i have blocked the main and sub transaction, any help will be appreciated as early as possible, this issue has to be solved on weekend.
    Regards
    K. Shilpa

    Hi Shilpa,
    First thing I will say that if you reverse an actual payment from customer's account, there are many impacts on the customer side and on SAP side. I think you have already taken care all these things.
    Now for the first point if you want the open SD will not appear in the print document, you can do it by reversing the security deposit or by invoicing printing configuration. For the first option you can go to change security deposit (FPSEC2) and reverse it. To do this all the SD documents should be in open status.
    For the second option you can go to the following menu path:
    SPRO-SAP Utilities-Invoicing-Invoice Processing-Item Selection in Invoicing-Item Selection in Account Maintenance/ Define Sub-Items
    In the above menu path for clearing type R4 (Invoicing) and periodic billing (R41),  you can control the items which will be printed in the invoice. Select the clearing type and click on the 'Item selection on bill print out' on the left hand side. For the clearing category (maintained at contract account level) you can maintain the main and sub transaction of security deposit (might be 0020 / 0020) and you can see a field 'IP' (Item Will Be Printed on the Bill) where you should maintain it blank. If you do that, security deposit will not be picked up in the invoice document. However it will remain open in the account if you just stop the printing of SD and keep it in the account.
    However it totally depnds on the business requirement and related implications whether you want to reverse the SD or you want to keep this in account and do not want to show them on the bill.
    Now for the second point you have mentioned, you need to first decide what you will do with the SD payments made by customer.
    Either you can release the SD amount and refund it to customer or the amount can be adjusted with the next invoice. Again it depends on business requirement whether you will refund any payment made against SD or you will simply reverse all open security deposits.
    Also if you want to stop the SD creation process now onwards, you need to revert all SD configuration like main / sub transaction configuration for SD, default SD releted settings etc. There is no standard process for it. If you want to reverse the SD, you can write a custom program. The configuration related things need to be done manually.
    Since all the things will impact the business process or customer, I hope you will take care those things before coming to a conclusion.
    Thanks.
    Nirmalya

  • Bank charges is not calculating at the time of payment to vendor by APP

    hi experts,
    In APP the paying company is paying to the vendor.Now they want to issue a DD (Demand Draft) to the vendor where a bank charges is involved.
    I have already customized the CHRGES/EXPENSES in Bank Determination Tab (transaction Code FBZP) to the corresponding Bank Subledger(outgoing) and also the Charge Indicator to the corressponding House Bank.
    the transaction key BSP is already assigned with the ledger(Bank Charges)
    I have already checked the Field status variant, it is ok
    But , that system is not calculating the bank charges as it is configured in the system at the time of payment through APP when a full MM invoice verification cycle is running
    Can anybody help me out?
    With regards,
    Sudipto Paul

    You have to select update profile, which works with payment budget. Secondly, you have to define the settings for payment transfer in OF29 transaction. You should consult the following notes, in order to secure smooth payment transfer procedure:
    For online update:
    Note 1695556 - Main features of Customizing for onilne payment update
    Note 882379 - FMPU_R: Recommendations for the online payment update
    In general:
    Note 400924 - Recommendations and rules for the payment transfer in FM
    Note 1466979 - FM Financial transactions to be used in FI line items

Maybe you are looking for