Formula to calculate the last active value in a row?

When using a simpe table, what formula will display the last active value in the row? Some of the cells are blank. I want a column to show the most recent value, which in this case will be the rightmost, non-blank cell.

B2 through J2 are your data
B3 =IF(B2="","",COLUMN())
Fill that to the rest of row 3
A2 =INDEX(B2:J2,MATCH(MAX(B3:J3),B3:J3,1))
If there are no values in the row, the answer will be an error triangle. You can put the IFERROR function around the formula and give it an answer when there is an error.

Similar Messages

  • Formula to calculate the last day of the subsequent month

    Hi - I am trying to create a formula in CR9 that will take a date field and translate it to the last day of the subsequent month.  For example, I have a date of today, 2/3/2009.  I need it to print on the report 3/31/2009.  I have made some progress to get me the 1st day of the subsequent month, but I need it to be the last day of the subsequent month.
    The formula I am have currently is:
    DateSerial(Year({Name.JOIN_DATE}), Month({Name.JOIN_DATE}) + 1, 0)+1
    this will give me 3/1/2009, but I need 3/31/2009.
    Any help appreciated. 
    Thanks!

    Hi Joe,
    You can use the following logic which also takes into account the extra day in a leap year.  You will need 5 formulas for this:
    First create a formula that calculates current month, call it @Current Month MM
    Month(Name.JOIN_DATE)+1
    Next create another formula called @Current Month Start Date which will give you the beginning of the month.
    totext(Date (year(currentdate),tonumber({@Current Month MM}) ,1 ))
    Next create another formula called @Current Year yyyy
    Year(Name.JOIN_DATE)
    Next, create a formula called @DaysofMonth with the following logic:
    if tonumber({@Current Year yyyy}) mod 4 = 0 then
    choose(month(date({@Current Month Start Date})),31,29,31,30,31,30,31,31,30,31,30,31) else
    choose(month(date({@Current Month Start Date})),31,28,31,30,31,30,31,31,30,31,30,31)
    Lastly create a formula called @Ending Date of Month
    totext(Date (year(currentdate),tonumber({@Current Month MM}) ,{@DaysOfMonth} ))
    I hope this information proves useful.
    Regards,
    Zack H.
    Edited by: Zack H on Feb 3, 2009 5:34 PM
    Edited by: Zack H on Feb 3, 2009 5:38 PM

  • How to calculate the Last sold value

    Hi All,
    Can we get the material last sold price based on the materials, suppose 20/11/2007 my material has been sold with value of  $100, on 15/11/2007 same material sold with value of $80, so in my report coloum i wolud like to see the value as $80,
    Best regards,
    Rams.

    Hi Sam,
    I have already tried, but the result is showing wrong, could u pls provide any other solution.
    Best Regards,
    Rams.

  • How to get Basic salary amount in the Housing formula to calculate the housing value as I used the DBI (NICDP_EMPLOYEE_BASIC_SALARY_AMOUNT_ASG_ENTRY_VALUE) but when run the Quick pay for the housing element alone result come 0, How to get Basic salary amo

    How to get Basic salary amount in the Housing formula to calculate the housing value as I used the DBI (NICDP_EMPLOYEE_BASIC_SALARY_AMOUNT_ASG_ENTRY_VALUE) but when run the Quick pay for the housing element alone result come 0, How to get Basic salary amount in the Housing formula to calculate the housing value as I used the DBI (NICDP_EMPLOYEE_BASIC_SALARY_AMOUNT_ASG_ENTRY_VALUE) but when run the Quick pay for the housing element alone result come 0

    Hi,
    Is your formula attached to basic salary element or some other element? You need to make sure that basic salary element has some value and is processed before this formula is called. Are you able to see value for basic salary element after payroll run?
    Regards,
    Pawan

  • How to get the last "reported" value in a cross tab

    Dear all,
    based on a BeX Query Universe I have built a report with a cross tab in webI.
    Maybe you can help me with the following issue. There I have a problem: I want to get in the Total-column always the last reported value, e.g. for Number Total Customers "66", not for Mar or Apr, because they are null.
    Calendar Month                      |Jan| |Feb| |Mar| |Apr| |Total|
    Number Total Customers         |54|    |66|  | |      | |       66
    Number Active Customers      |57|    |71|  | |      | |       71
    I hope that you understand my problem and could help as soon as possible.
    Thanks a lot in advance for your support.
    Best regards.
    Edited by: HOLWUE on Feb 8, 2010 1:40 PM

    Hi,
    If this question is related to Webi then post in the below forum.
    http://scn.sap.com/community/businessobjects-web-intelligence/content?filterID=content~objecttype~objecttype[thread]
    Regards,
    Sujit.

  • Using an index to access the last n values of a certain combination

    I have a large table of the following form:
    Name Typ
    ID NUMBER
    M_DATE DATE
    M_LOC NUMBER
    M_ARTICLE VARCHAR2(30)
    M_TYPE VARCHAR2(30)
    M_MEASURE VARCHAR2(50)
    VALUE NUMBER
    In this table there is only a small number of different locations, articles, types and maesures but a large number of m_date values.
    I want to access the last 10 values for a certain combination of locations, articles, types and measures.
    I have an index
    create index i_res_2 on results (m_loc, m_article, m_type, m_measure, m_date);
    In my opinion it should be possible to access the last 10 values directly by this index, but
    when I do my select in the following way it seems to me that first all datasets with the same
    locations, articles, types and maesures are selected, then sorted by date and then the last 10
    dates are selected. As those datasets are spread over the whole table it needs a higher number
    of physical reads. Is there a way to have an index on m_date and an other form of this query
    that selects the requested values with less phyical reads? (Database version is 10.2)
    SQL> select
    2 id,
    3 m_date,
    4 value
    5 from (
    6 select
    7 id,
    8 m_date,
    9 value,
    10 rank() over (order by m_date desc) r
    11 from results
    12 where m_loc = '14001'
    13 and m_article = '11211-00-00'
    14 and m_type = '0002'
    15 and m_measure = '032')
    16 where r <= 10
    17 order by m_date asc;
    ID M_DATE Value
    3931958 05.03.10 69.00
    3931960 05.03.10 69.00
    3905712 10.03.10 68.60
    3999535 10.03.10 69.70
    3985125 11.03.10 69.40
    3957851 11.03.10 69.60
    3949799 21.03.10 68.70
    4017369 21.03.10 69.00
    3951981 22.03.10 68.80
    3983554 22.03.10 68.80
    Abgelaufen: 00:00:03.00
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 1 | 48 | 6 (34)| 00:00:01 |
    | 1 | SORT ORDER BY | | 1 | 48 | 6 (34)| 00:00:01 |
    |* 2 | VIEW | | 1 | 48 | 5 (20)| 00:00:01 |
    |* 3 | WINDOW SORT PUSHED RANK | | 1 | 39 | 5 (20)| 00:00:01 |
    | 4 | TABLE ACCESS BY INDEX ROWID| RESULTS | 1 | 39 | 4 (0)| 00:00:01 |
    |* 5 | INDEX RANGE SCAN | I_RES_2 | 1 | | 3 (0)| 00:00:01 |
    Predicate Information (identified by operation id):
    2 - filter("R"<=10)
    3 - filter(RANK() OVER ( ORDER BY INTERNAL_FUNCTION("M_DATE") DESC )<=10)
    5 - access("M_LOC"=14001 AND "M_ARTICLE"='11211-00-00' AND "M_TYPE"='0002' AND
    "M_MEASURE"='032')
    Statistiken
    1 recursive calls
    0 db block gets
    547 consistent gets
    474 physical reads
    0 redo size
    766 bytes sent via SQL*Net to client
    380 bytes received via SQL*Net from client
    2 SQL*Net roundtrips to/from client
    2 sorts (memory)
    0 sorts (disk)
    10 rows processed

    I found a solution, which is much better in terms of physical reads and consistent gets even if the optimizer calculates higher costs. But I still think, that there should be an easier way to do this:
    SQL> select
    2 id, m_date, value from results
    3 where
    4 (m_loc, m_article, m_type, m_measure, m_date)
    5 in
    6 (select m_loc, m_article, m_type, m_measure, m_date
    7 from (
    8 select /*+ first_rows(10) */ m_loc, m_article, m_type, m_measure, m_date
    9 from results
    10 where m_loc = '14001'
    11 and m_article = '11370-00-00'
    12 and m_type = '0002'
    13 and m_measure = '032'
    14 order by m_loc,m_article,m_type,m_measure,m_date desc
    15 ) where rownum < 10);
    ID M_DATE VALUE
    2495995 01.02.09 70,4
    2457657 19.01.09 66,9
    2556262 13.02.09 67,4
    2496232 01.02.09 67,6
    2465051 20.01.09 67
    2454994 19.01.09 67,4
    2545951 13.02.09 67,4
    2502216 01.02.09 67,5
    2497533 01.02.09 67,2
    9 Zeilen ausgewählt.
    Ausführungsplan
    Plan hash value: 3924867000
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 1 | 122 | 8 (25)| 00:00:01 |
    | 1 | TABLE ACCESS BY INDEX ROWID| RESULTS | 1 | 39 | 3 (0)| 00:00:01 |
    | 2 | NESTED LOOPS | | 1 | 122 | 8 (25)| 00:00:01 |
    | 3 | VIEW | VW_NSO_1 | 1 | 83 | 4 (25)| 00:00:01 |
    | 4 | HASH UNIQUE | | 1 | 31 | | |
    |* 5 | COUNT STOPKEY | | | | | |
    | 6 | VIEW | | 1 | 31 | 4 (25)| 00:00:01 |
    |* 7 | SORT ORDER BY STOPKEY| | 1 | 31 | 4 (25)| 00:00:01 |
    |* 8 | INDEX RANGE SCAN | I_RES_2 | 1 | 31 | 3 (0)| 00:00:01 |
    |* 9 | INDEX RANGE SCAN | I_RES_2 | 1 | | 2 (0)| 00:00:01 |
    Predicate Information (identified by operation id):
    5 - filter(ROWNUM<10)
    7 - filter(ROWNUM<10)
    8 - access("M_LOC"=14001 AND "M_ARTICLE"='11370-00-00' AND "M_TYPE"='0002'
    AND "M_MEASURE"='032')
    9 - access("M_LOC"="$nso_col_1" AND "M_ARTICLE"="$nso_col_2" AND
    "M_TYPE"="$nso_col_3" AND "M_MEASURE"="$nso_col_4" AND "M_DATE"="$nso_col_5")
    Statistiken
    1 recursive calls
    0 db block gets
    36 consistent gets
    14 physical reads
    0 redo size
    748 bytes sent via SQL*Net to client
    381 bytes received via SQL*Net from client
    2 SQL*Net roundtrips to/from client
    1 sorts (memory)
    0 sorts (disk)
    9 rows processed

  • DAQmx :: Continous reading of the last 10 values of a continous data-aquisition at a fixed point

    Hello,
    I am using a NI-PCI 6259 for generating and aquiring data.
    The other configuration is:
    - LabVIEW 7.1
    - DAQ 7.3
    I need to measure three anaolg channels, and generate an analog output. Additonally I need to read some values over the RS232. The whole activity should repeat every 30ms. To get this, I am using a timed loop at the moment. I generate a clock with counter 0 and read it with counter 1 for the timed loop. Inside the timed loop I start/stop a finite aquisition for the three analog channles and the RS232 reading. The fastest aquiring supported by the RS232 is an iteration every 30ms. Without the analog aquisition the system runs without any dropped loops. By adding the analog aquisition the timed loop dropps 2-5 loops every 1000 iterations.
    I think the problem is the repeated start/stop of the aquisition. Maybe a solution is a continous aquistion by reading out the last 10 values of the buffer every start of the timed loop. But all my tests failed, because of the FIFO design of the buffer. When I start a continous aquisition outside the timed loop and read 10 values inside, I always have the first 10 values of the buffer, not the last ones.
    Does anyone has an idea, how to read loop the last 10 values of a continous aquisition inside a timed ?
    Thanks a lot for your help.
    Best regards,
    Michael
    Attached you will find the actual state of the testprogram. Because the aqusition should be in the last quarter of the generated output value, the values of the loaded waveform (output) are four times resampeled and the clock has four times the speed of the aquisition, which generates a timing event every four clocks.
    Attachments:
    Datenerfassung.zip ‏3047 KB

    To address your main issue you might try using the DAQmx control Task VI right after you call the Timing VI (outside the timed loop) and set its value to commit. This allows for more efficient starts and stops. Some other things I saw in your program which might make it a little easier and use less HW. First, you shouldn't need to create a CO task on ctr0 and then feed it to the timed loop using ctr1. Why don't you just use the Frequency personality of the timed loop? That way you will only use one counter. If you want to use the 2 counter method then to avoid using external wiring as the source for counter 1 in the timing source VI use CTR0/internaloutput. This is an advanced property for the terminal I/O control so you will need to right click on the constant and select I/O filtering. Finally, when you specify your create channel for the AI Voltage why are you doing this in a for loop. You can just have one channel string Dev1/Ai16:18 and that will create all 3 channels with the same information. Hope this helps
    StuartG

  • I use "firefox -new-tab anyPage.html" but it does not open it in new tab. Instead it replaces the last active tab.

    Well I use following command to view offline pages using firefox on my linux box
    $ firefox -new-tab anyPage.html
    But instead of opening it in new tab, it replaces the last active tab.
    I have tired
    $ firefox -new-tab anyPage.html &
    $ firefox -remote "openurl(anyPage.html,NEW_TAB)"
    But none works.
    Sometimes it do open in new tab but mostly it does not. I have been unable to figure out any pattern.
    == This happened ==
    Every time Firefox opened

    (''Note: cross posted from [https://support.mozilla.com/nl/questions/801471 here].'')
    I had the same problem, but was able to fix it somewhat.
    # Open the about:config page.
    # Set the ''browser.link.open_newwindow.restriction'' setting to 0 (= zero).
    On my machine this will open new windows in a new tab. However, it switches to the new tab regardless of the setting ''"When I open a link in new tab, switch to it immediatly"''.

  • Getting the last active number purchasing info record

    Hi,
    I was trying to get the last active number of the purchasing info record.
    As in the ME21N, while creating a purchase order, once we have entered the material number, the system automatically returns the adequate number of the info recored, but I could't identify (through debug) which was the function module or method call used to get it.
    I will be really thankful if somebody could help.
    Thanks & regards.

    Thanks to all for your answers. I finally figured it out with the help of a functional consultant.
    To identify the last active number purchasing info record, we retreive from table EINA, and there, the field LOEKZ should be empty.
    Basically, we only have one info record number per couple material/vendor.
    Ragards

  • While P.O creation material automatic capture the last Purchase value

    Dear all
    Please guide me for the following :
    I need a scenario like while creation of new P.O if material already purchase then system automatic capture the last purchase value as per the given material....
    Thanks & Regards,
    Neha

    Prompt the last Purchase Order Price for the Material
    If you want the system to take the price from the last Purchase Order, then do not maintain the conditions in the info record because it has precedence over the last PO. This means that the netprice field in the info record should be left blank.
    In the case when you have already maintained the conditions in the info record (or netprice), try to delete them or make them invalid by changing the validity date.
    Even though no price was maintained, the info record will still keep track of the Order price history.
    To check the Order price history, go into the material info record and click Environment -> Order price history
    Edited by: Sachein on Oct 20, 2011 6:54 AM

  • Is it possible to maintain the last AO value after the DAQmx task is done on device DAQ USB-6341 ?

    Hi all,
    I use the device DAQ USB-6341 to generate the desired voltage waveform by the "finite samples" sample mode.
    I notice that the channel resets to zero volts after the DAQmx task is done and the DAQ USB-6341 does not have 
    the property AO.idleOutputBehavior to select "Maintain Existing Value".
    How can I maintain the last AO value after the DAQmx task is done on device DAQ USB-6341 ?
    Thanks.
    Godel

    How many computers do you have in the network?
    What is the IP address and default gateway number on your computer?
    In order to connect to the wireless network, WVC80N should get valid IP address from the access point.
    If the access point has capacity to assign a private IP address to the computers and devices then I think you can use WVC80N.

  • New measurement starts with the last measurement value before program stop

    New measurement starts with the last measurement value before program stop. This is very embarrassing because we finish at a high measured value and start with small value, which can not be seen on the autoscale screen due to the memorized high first value. We use NI PCI-6220 DAQ board and software written in LabView 7.1 using Express VIs and running in the LabView environment. The program (attached) every half second measures 3 AI channels, filters and scales the data, visualizes, averages and saves it in a file. Please advise me how can I avoid this problem. Please note that I am not very experienced in LabView.
    Attachments:
    OLED_Monitor2.vi ‏785 KB

    I can not run your vi, but if you initialize your controls you should be ok.
    Look at the picture
    Attachments:
    Clipboard-2.jpg ‏16 KB

  • Making an average of the last 100 values?

    Hi everyone,
    I am acquiring a signal every 1000mS with Labview 7.1. I need to make an average of the last 100 values every 1000mS. I know how to do this with shift registers but it would be a bit long to do it this way...There must be a better way
    Would anybody have an example of an array that takes into consideration the new value that has just been acquired, so that I can make an average of the array?
    Thank you very much for your help,
    Toto

    Hi Toto,
    Here is the first thing I thought of.  Initialize an array of 1000 elements, and replace an element each iteration of the loop.  Use the Quotient and Remainder function along with the iteration count of the loop to replace the oldest element in the array.  Add the array and divide by 1000 in each iteration to get the current average.  I've attached the VI (saved in LabVIEW 7.1), along with a screenshot for anyone who wants to see it but doesn't have LabVIEW 7.1 or later.
    Good luck,
    -D
    Message Edited by Darren on 02-05-2006 07:40 PM
    Darren Nattinger, CLA
    LabVIEW Artisan and Nugget Penman
    Attachments:
    Running_average.vi ‏11 KB
    Running_average.jpg ‏32 KB

  • How to find the last string value in dynamic object?

    Hi All,
    I am trying to find the last string value in dyanamic objects,Any one have solution for this.
    Ex:
    my data :12347-ebjdone-525-ecgfjf-25236-defdafgdeg
    And i want to show the output is :defdafgdeg
    Any ideas:
    Thanks
    Srini

    For oracle try using oracle function.
    e.g.
    SELECT  reverse(substr(reverse('12347-ebjdone-525-ecgfjf-25236-defdafgdeg'),1,instr(reverse('12347-ebjdone-525-ecgfjf-25236-defdafgdeg'),'-','1'))) from dual
    Object definition might look like:
    reverse(substr(reverse({ObjectName}),1,instr(reverse({ObjectsName}),'-','1')))
    Regards,
    Kuldeep
    Edited by: Kuldeep Chitrakar on Feb 12, 2010 8:12 AM

  • Getting the last selected value of the combo  - very very urgent...........

    On my panel i have a jcombobox in upper half(which displays say the address type.) and few text fields on the lower half(which displays the add details). when the user selects a value in the combo box the text fields are populated based on the selection. The user can change the values displayed in the text fields. So before setting the new values in the text fields the last displayed values need to be saved.
    I have an ActionListener for my combo which gives me the currently selected value by calling getSelecetdItem()
    How can i get the last selcted value of the combobox without using any variable of my own.

    To update the last displayed details(the address details say) i need to check what type of address the combo had previousely.....
    when i display the panel first time the home address is set by default and i have a variable to hold this value..as the user changes the selection i update the variable...I don't want to use this variable..instead if i can get the last selcted value from the event that would be great...
    thanks

Maybe you are looking for

  • Is there any way to change audio conforming in preferences?

    Hi I am uploading about 4 hours worth of footage for a new project to CS5 Premier Pro, and have found that I can only capture in 10 minute segments as when I capture anything longer due to capture/conform back up that inevitably occurs eventually PP

  • Hp laserjet 100 color mfp m175a suddenly very slow

    I have a HP LaserJet 100 color MFP M175a printer, which has always worked fine (except when in cool down mode). Suddenly, it has started printing extremely slowly - for example, last night I sent a document of 20 pages to print at around 9pm and was

  • Email PO - Has anyone configured the Company Name in the Subject Email?

    Hi experts, I have configured the following in the subject of the email for all of our PO's being sent via email.  PO  &EKKO-EBELN& - &EKKO-BUKRS& This shows the PO Number and the Company Code in the subject line.  My clients do not want the Company

  • Invalid statement in Performance Tuning Guide

    Oracle® Database Performance Tuning Guide 10g Release 2 (10.2) Part Number B14211-01 13 The Query Optimizer http://download.oracle.com/docs/cd/B19306_01/server.102/b14211/optimops.htm#sthref1324 excerpt: "You can specify fast full index scans with th

  • Bought a Template for a customer Need Help

    I know HTML but the coding to change things baffles me.  I am out of help with the seller who is in Australia. This is what the .txt looks like that I change function with. &Home_txt8=<font color="#d0d0d0"><b>text goes here It looks straightforward b