Second row data -  First row data of other column?

Hi All,
I have a requirement to show the second row data of the column1 as first row in column2. Please see the example below, where month is filtered <= 05.
Month    Sales    Sales_New
01         500      600
02         600      700
03         700      800
04         800      900
05         900      NULLIn the above example for month 05, column Sales_New should show NULL because it is the last row of the query.
Thanks in advance.

Something gone wrong with your config....!!
How about
"In Criteria tab use Month descending order and in Pivot table use ascending order"
This is mandatory to achieve this..
FYI: I've tested this in my local.
If you need will send screenshot
I appreciate if you mark as correct ;) else let me know

Similar Messages

  • Query regarding inserting a new row at first row data table

    hi all,
    I have a doubt regarding the insertion of new row in data table.I am now using the following code
    if (skillDataProvider.canAppendRow()){
    RowKey rowkey = skillDataProvider.appendRow();
    skillDataProvider.setCursorRow(rowkey);
    String skillID=getSkilID();
    skillDataProvider.setValue("Skill.SkillID", rowkey, skillID);
    int rowID=Integer.parseInt(rowkey.getRowId());
    tableRowGroup1.setFirst(rowID);
    Its working fine.But this code gives me provision to add the data at the last of the table.I need it to be at the first row.I tried
    RowKey rowkey=skillDataProvider.insertRow(skillDataProvider.getRowKey(String.valueOf(0)));
    but it shows some null pointer exception.Can anyone help me?
    Thanks in advance
    Sree

    I think AChervov has the right idea here.
    CachedRowSetDataProvider.canInsertRow(beforeRow) returns false, so you cannot insertRow().
    Therefore, you'll need to control the sort order yourself. I'd add a sort field to the database. Then use TableRowGroup.setSortCrtieria() to control the table display order. Or commit the append to the database immediately and reselect (refresh) the provider (assuming the provider has the desired "order by").

  • Alv colour row select first row

    Hi. I hava an alv with colour in some rows. When i want to select another row distint the first, it always goes to de first row and it doesn't allow me select other row.
    how can i solve this to select for example the third row.
    thanks.

    Hi,
    Are you programatically setting the selection of the ALV row anywhere in your program? This might happen if you set the lead selection of the node in the WDDOMODIFYVIEW method of your view. Can you please check that ? Also you can try changing the selection mode of your ALV:
    lo_config_model_value = lo_interfacecontroller->get_model( ).
    lo_config_model_value->IF_SALV_WD_TABLE_SETTINGS~SET_SELECTION_MODE(CL_WD_TABLE=>E_SELECTION_MODE-AUTO).
    Best Rgds,
    Viqar.

  • We can able to load master data through manually FIRST ROW IS EMPTY

    Hi,
        we can able to load master data through manually without loading but in that screen where we we type the data FIRST ROW IS EMPTY.PLZ tell me why that is empty

    Becasue SAP BW already creates a Blank Line, it cannot create a new one again for you.
    So, when you loaded the Blank like with description, it uses the existing blank line and creates test for it.
    Each row in the table will have a SID.
    e.g.,
    12345 text1
    23446 text2
    You cannot have
    12345 text1
    12345 text2
    If you load the above, you will have "12345 text2" in the table.
    Same way, you cannot have two SIDs for the same key, so your new text is used for the existing Blank Key value.
    SAP creates this:
    Key, Description
    when you loaded the Master Data, you have:
    " ", "whatever you loaded".
    Edited by: Ananda Theerthan on Apr 27, 2010 7:03 AM

  • First row is repeting while accessing multiple rows through Database adapte

    Hi,
    Iam using Database adapter in BPEL process to retrive the data from remote database.In Database adapter i have selected select operation and passing input parameter.
    Actually that adapter needs to return 10 different rows though output variable of that adapter.
    Its returing 10 rows but the first row is repeting 10 times.
    Iam not able to get 10 rows.only first row is repeting.
    Please help me in this.
    Thanks in Advance

    Hi Arik,
    I got the solution.The problem is primary key only.
    Your solution correct.
    Thank u very much for answering this question quickly.
    I have changed the primary key its working fine.
    Could u please explain me what is the problem with primay key exactly.
    Thanks in advance,
    Sreeni

  • First shipment date of a particular material

    Hi all,
    I would like to know if there is a transaction or table where I could find the "First Date of Shipment"  based on Material Code.
    I need it to find whether that material is new or not. Also we can build the first arrival date by looking at "First Date of Shipment".
    Once a material is considered new, the u201Cnew item indicatoru201D should remain true for a period of three years.  Each week, a process needs to run that looks at the material master data (First Arrival Date) and compares that with the current date to check if three years has passed.  If three years has passed, then the u201Cnew item indicatoru201D should be set to False.
    Thank you a lot in advance!
    Regards,
    Priyanka A.

    Runtime Errors         CALL_FUNCTION_NOT_ACTIVE
    Except.                CX_SY_DYN_CALL_ILLEGAL_FUNC
    But when i check forr the function module it shows Active. ('YLISTE_KENNZAHLEN'--- copied form standerd )..
    But Function Group is not active  when i tried to activate it... it gives me some error like
    Include LYMCB3O01
    Field "CONSUMPTION" is unknown. It is neither in one of the specified
    tables nor defined by a "DATA" statement . . . . . . . . . .
    Include LYMCB3O01
    Field "REQUIREMENT" is unknown. It is neither in one of the specified
    tables nor defined by a "DATA" statement . . . . . . . . . .
    Include LYMCB3F01
    But when i compair with standerd one it shows no error..
    Plz Suggest

  • First date and last date of current year

    Hi
    how can i get first and last date of current year, thanks for your help

    hi,
    use FM......... FIRST_AND_LAST_DAY_IN_YEAR_GET
    DATA: first LIKE sy-datum,
          last LIKE sy-datum.
    CALL FUNCTION 'FIRST_AND_LAST_DAY_IN_YEAR_GET'
      EXPORTING
        i_gjahr     = '2007'
        i_periv     = '24'
      IMPORTING
        e_first_day = first
        e_last_day  = last.
    WRITE: / 'First Date', first, '    Last Date', last.
    Regards
    CNU

  • How to set the first row as selected in single selection of table

    when the page renders how do we make the first row as selected for single selection in a table.
    Thansk a lot for your help

    set the selection Attribute's value to 'Y' for the first row. Thats enough.
    eg;
    Row row=vo.first();
    row.setAttribute("SelectionAttribute", "Y");
    --Prasanna                                                                                                                                                                                                                                                                                                                                           

  • Moving cells independent of rows, ie delete cell and move others up.

    This has to be easy but i can't figure it out. I have a document with 4 columns by 50 rows. All of the cells are independent of the rows they are in and from time to time i need to delete a cell and move the cells below it up. Its easy in excel, you just highlight the cell and it asks "move up" or "move down". I can't seem to find anything comparable in numbers. I seem to be only able to delete entire rows which would delete cells in other columns that I need. Is there a way to do this? Thanks.

    r,
    It's pretty easy in Numbers too, but it's not the same. Let's say you want to move all the cells below a certain cell up one row to eliminate that single cell. Select all the cells that you want to move, Edit > Mark for Move, click on the cell you want to eliminate, Edit > Move.
    Jerry

  • Inhouse Cash : interest scale posting date and value date

    Hello,
    We would like to configure the posting of the calculated interests at month end as follows:
    calculation period  : from first calendar date of the month (included) until last calendar date of the month (also included !)
    posting date = last calendar date of the month
    value date = first calendar date of the next month
    My understanding is that the posting date of F991 is driven by F9L4.  How can I make sure that valuedate of the payment item generated by T-code  F991 (mass balancing)  = F9L4 date + 1 calendar day?
    Thank you very much for your suggestions.
    Carl

    I agree that you can influence the value date as compared to the posting date,
    but that is not the key issue.
    Key is how to ensure that both the interest calculation end date AND the posting date be equal to the last calendar date of the month?
    The system seems to look at what is stored in the account balancing tab of F9K3 and if you have "31" stored there, the system seems to calculate until the 30th of the month (for months of 31 days, obviously).
    I can however not put in F9K3  "1"  (first day of the month), because then I will be unable to trigger the interest scales (F991) with a posting date 31st of the previous month, because in order to trigger F991 the date in F9L4 (which is the posting date of the interest scales) must be equal to or bigger than the date stored in F9K3 (next balancing date, which would be equal to 1st of the next month !
    So, It looks I am running in circles.....
    Any solution for this?
    Thx,
    Carl

  • Pie Chart Only Displays the Data of the First Row of the Table

    Hi Experts,
    I have a problem that the pie chart will not change when click on a second row or other rows on the table. It only displays the data of the first row of the table. How can I set up to make it reflect on any rows when I click the table? Please help, and I would very appreciate that.
    Thanks,
    -Don

    Thanks a lot for your response. I have realized that the pie chart behaves that way, so I just use the filter to see the specific data that I want. Also, you can drag the row and drop it right at the first row to see the data in the pie chart.

  • Date Controls in repeating table of Infopath 2013 only showing Calendar in first row date controls

    I am using SharePoint 2013 and InfoPath 2013.
    and using form library which uploaded at server.
    I am using repeating table over section . and place Date Controls.
    At the run time it is showing first row with START and END
    date controls.
    when I click INSERT Item it is showing second row with
    Date Controls.
    It is opening and showing calendar only on first row.
    But when I click Date Control button at second row it is not showing or opening calendar.
    Yesterday it was working. but today is not working at site.
    Although it is working on InfoPath 2013 Preview.

    Hi John,
    Based on your description, my understanding is that the Date Control cannot work correctly in the InfoPath form.
    I recommend to re-publish the form to SharePoint and then compare the results.
    Please go to the Library setting page of the library where the form is published > click Advanced Settings > click Edit Template in the Document Template > now the form will be opened in InfoPath Designer and then click Quick Publish button in the
    top of the menu tab.
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

  • Get only the first row for duplicate data

    Hello,
    I have the following situation...
    I have a table called employees with column (re, name, function) where "re" is the primary key.
    I have to import data inside this table using an xml file, the problem is that some employees can be repeated inside this xml, that means, I'll have repeated "re"'s, and this columns is primary key of my table.
    To workaround, I've created a table called employees_tmp that has the same structed as employees, but without the constraint of primary key, on this way I can import the xml data inside the table employees_tmp.
    What I need now is copy the data from employees_tmp to employess, but for the cases where "re" is repeated, I just want to copy the first row found.
    Just an example:
    EMPLOYEES_TMP
    RE NAME FUNCTION
    0987 GABRIEL ANALYST
    0987 GABRIEL MANAGER
    0978 RANIERI ANALYST
    0875 RICHARD VICE-PRESIDENT
    I want to copy the data to make employees looks like
    EMPLOYEES
    RE NAME FUNCTION
    0987 GABRIEL ANALYST
    0978 RANIERI ANALYST
    0875 RICHARD VICE-PRESIDENT
    How could I do this?
    I really appreciate any help.
    Thanks

    Try,
    SELECT re, NAME, FUNCTION
      FROM (SELECT re,
                   NAME,
                   FUNCTION,
                   ROW_NUMBER () OVER (PARTITION BY re ORDER BY NAME) rn
              FROM employees_tmp)
    WHERE rn = 1G.

  • Return first row entered based on date column

    I'm trying to select the first entered row in a table, as judged by the datetime column. If more than one row has the same date and time, then only one row should be returned (any row having that datetime is fine). Some processing will occur on that row and then it will be deleted. The select statement is used thereafter to select the next (first) entered row in the table, etc. This way, the rows are processed first-in first-out (FIFO) style. Here's my example table:
    create table my_table
    datetime date,
    firstname varchar2(50)
    insert into my_table(datetime, firstname) values(to_date('2012-04-02 11:00:00', 'YYYY-MM-DD HH24:MI:SS'),'ken');
    insert into my_table(datetime, firstname) values(to_date('2012-04-02 11:00:00', 'YYYY-MM-DD HH24:MI:SS'),'john');
    insert into my_table(datetime, firstname) values(to_date('2012-04-02 11:00:00', 'YYYY-MM-DD HH24:MI:SS'),'sue');
    commit;
    Here's my example select statement, which returns simply one row of the above, since all are the same date and time:
    SELECT *
    FROM my_table
    WHERE datetime = ( select min(datetime) from my_table )
    AND rownum = 1;
    My question is, if I use the following
    SELECT *
    FROM my_table
    WHERE datetime = ( select min(datetime) from my_table );
    It returns all 3 rows:
    DATETIME FIRSTNAME
    02-APR-12 11:00:00 ken
    02-APR-12 11:00:00 john
    02-APR-12 11:00:00 sue
    So, wouldn't setting rownum = 2 return john, and rownum = 3 return sue? For example,
    SELECT *
    FROM my_table
    WHERE datetime = ( select min(datetime) from my_table )
    AND rownum = 2;
    return no rows. I just want to make sure I'm understanding how the select statement above works. It seems to work fine for returning one row having the minimum date and time. If this is always the case, then everything is fine. But I wouldn't have expected it not to return one of the other rows when rownum is 2 or 3, which makes me question why? Maybe I can learn something here. Any comments much appreciated.
    Edited by: tem on Apr 2, 2012 2:06 PM

    Hi,
    tem wrote:
    ... So, wouldn't setting rownum = 2 return john, and rownum = 3 return sue? For example,, ROWNUM
    SELECT *
    FROM my_table
    WHERE datetime = ( select min(datetime) from my_table )
    AND rownum = 2;
    return no rows. I just want to make sure I'm understanding how the select statement above works. It seems to work fine for returning one row having the minimum date and time. If this is always the case, then everything is fine. But I wouldn't have expected it not to return one of the other rows when rownum is 2 or 3, which makes me question why? Maybe I can learn something here. Any comments much appreciated.ROWNUM is assigned as rows are fetched and considered for inclusion in the result set. If the row is not chosen for any reason, the same ROWNUM will be reused with the next row fetched. ROWNUM=2 will not be assigned until a row with ROWNUM=1 has been included in hte result set.
    So, in your example:
    SELECT  *
    FROM    my_table
    WHERE   datetime = ( select min(datetime) from my_table )
    AND     rownum = 2;Say the first row that happens to be fetched has firstname='ken'. It is assigned ROWNUM=1, and fails the WHERE clause condition "WHERE rownum = 2".
    Say the next row fetched has firstname='john'. ROWNUM=1 hasn't been used yet, so this row is also assigned ROWNUM=1, and it fails the WHERE clause for the same reason. Likewise with the next row; it also is assigned ROWNUM=1, and it also fails.
    When using ROWNUM in a WHERE clause, you almost always want to say "ROWNUM = 1" or "ROWNUM <= n".
    You could also use the analytic ROW_NUMBER function:
    WITH     got_r_num     AS
         SELECT     datetime, firstname
         ,     ROW_NUMBER () OVER (ORDER BY  datetime)     AS r_num
         FROM     my_table
    SELECT     datetime, firstname
    FROM     got_r_num
    WHERE     r_num     = 1
    ;Here, all values of r_num are available, so it would make sense to say things like "WHERE r_num = 2" or "WHERE r_num >= 2".
    Edited by: Frank Kulash on Apr 2, 2012 5:31 PM
    Added to explanation.

  • Preview not displaying List View Data past first row

    I guess this is a simple question.  I have my Excel model working the way I wish it to.  The components before preview are functioning accordingly.  When Preview is run, the data in the two spreadheet tables is not displayed past the first row.
    Basically, is there some gremlin within Flash that is ignoring or deleting the functions (VLOOKUP) in the targeted display area?  By all rights, this should be working, and I am kind of surprised that it isn't

    If the data is static, it will display.  My research turned up that VLOOKUP and HLOOKUP functions will not display after the first row of data.
    Source:  Xcelsius 2008 Dashboard best Practices by Loren Abdulezer, pages 407-408
    My problem is that in making the data dynamically selectable, and using multiple functions to bring results to the top of the spreadsheet instead of their respective locations; it has created a situation where I have an Excel model that works, but an Xcelsius model that does not.
    Doesn't look like there really is a solution to what I am trying to do, short of completely rebuilding the model, which I do not have the ability to replicate.

Maybe you are looking for

  • Help needed in using exceptions

    can anyone please correct the code for me. i am posting the code after doing all my homework , i tried the best of me not able to solve the error. thanks in advance i would prefer a clue how to solve the error even after the clue if im not able to so

  • Text on Third Party Sales Order to PO

    We have a thrid party sales order that creates a purchase requistion then PO.  If line item text is added at time of order creation it will transfer to the purchase requistion then the PO.  However if you add line item text when changing the sales or

  • Button hyperlinks work in project preview but not in published .swf

    Captivate 6, button hyperlinks work in project preview but not in published .swf, the cursor changes the "the hand" but the hyperlink does not redirect. Any ideas? Like I said my buttons work great in preview mode after publishing, one click and the

  • Help!  PC crashed.. how do I get my music from my IPod back onto my ITunes and PC??

    My PC recently crashed.  I have a new one now, but once I re-installed ITunes it only pulled the purchased music.  How do I get all the other music that I burned from CD's and from other sources back onto my PC from the IPod?  I know there has to be

  • I can't compile this, why?

    I do not possess any means of compiling any .java file that imports javax.* or anything J2SE-related, thus, I have to compile it remotely on a remote host (www.myjavaserver.com), however, for some reason this file will not compile but will not produc