Second data line - first row to another column?

Hi all

I have a requirement to show the data from second in the Column1 as first line of Column2. Please see the example below, where the month is filtered < = 05.
Month    Sales    Sales_New
01         500      600
02         600      700
03         700      800
04         800      900
05         900      NULL
In the example above for month 05, column Sales_New should show NULL because it is the last line of the query.

Thanks in advance.

Something has gone wrong with your config...!
What is
"In the criteria tab use months in descending order and in the PivotTable, use ascending order.

It is mandatory to achieve...
FYI: I tested in my local.

If you need send screenshot

I appreciate if you score as correct ;) else let me know

Tags: Business Intelligence

Similar Questions

  • Find the first row of each column

    Hi all

    Request:

    I want to find the first line in the text frame columns.

    Bug:

    If the active document contains a single column, two columns, and multiple column text blocks. In this case, I'm not able to get my result

    Try the script:

    myDoc = app.activeDocument var

    var myTextFrames = myDoc.textFrames.everyItem () .getElements)

    for (i = 0; i < myTextFrames.length; i ++)

    {

    var myTextColumns1 = myTextFrames [i] .textColumns [1] .lines [0] .silence

    Alert (myTextColumns1)

    }

    Attached, I have attached the error file.

    If the active document contains only two block of text column, script executed successfully.

    If the active document contains the single column text block and the sampling error two columns of text as below:

    Screen Shot 2013-03-27 at 3.31.16 PM.png

    Could someone find solution for my application.

    Thanks in advance

    BEGINNER

    Try this,

    myDoc = app.activeDocument var

    var myTextFrames = myDoc.textFrames.everyItem () .getElements)

    for (i = 0; i

    {

    for (var j = 0; j)

    {

    var myTextColumns1 = myTextFrames [i] .textColumns [j] .lines [0] .silence

    $.writeln (myTextColumns1)

    }

    }

  • display the data in a row and different columns in the listbox

    Hi I want to disply data in different and same columns line in listbox using InsertListItem(), but it displays data in different lines... I use the escape sequence for the creation of columns... Also, I want to display an integer which I converted to a string using sprintf() on listbox with a Word, for example 10 Kg where 10 is stored in a variable and I must add Kg, how to do it in a single call to InsertItemList()... Thank you

    I see: you must create all of the line before adding it to the list box:

    sprintf (string, "&d\033p30l%s\033p100l%s\033p170l%d\033p220l%.2f", itemNo, itemName, itemPack, 123, 15.98);
    InsertListItem (panel, PANEL_LISTBOX , 0, string, 0);
    
  • change table 1 d of data for a row to a column

    Hi all

    This can be a very simple question, but im trying to take two 1 d of data tables, put them in a table and this table to be 1 column so it looks neat in a table.

    Thank you

    You will probably need to transpose the array, because the array build function will add lines. This will give you columns you want:

  • How to add two lines when the second row is not visible, but also gets the first data line too?

    Mr President

    Jdev worm is 12.2.1

    How to add two lines when the second row is not visible, but also gets the first data line too?

    I want to add two lines like below picture, but want the second to remain invisible.

    tworows.png

    I asked this question but my way of asking was wrong, that's why for me once again.

    Concerning

    Try to follow these steps:

    1. in the database table to add the new column "JOIN_COLUMN" and add the new sequence "JOIN_SEQ".

    2. Add this new column in the entity object. (You can add this in entity object by right clicking on the entity object and then select "Synchronize with database" then the new column and press on sync)

    3. in your bookmark create button to create only one line NOT 2 rows.

    4 - Open the object entity--> java--> java class--> on the entity object class generate and Tick tick on the accessors and methods of data manipulation

    5 - Open the generated class to EntityImpl and go to the doDML method and write this code

      protected void doDML(int operation, TransactionEvent e)
      {
        if(operation == DML_INSERT)
        {
          SequenceImpl seq = new SequenceImpl("JOIN_SEQ", getDBTransaction());
          oracle.jbo.domain.Number seqValue = seq.getSequenceNumber();
          setJoinColumn(seqValue);
          insertSecondRowInDatabase(getAttribute1(), getAttribute2(), getAttribute3(), getJoinColumn());
        }
    
        if(operation == DML_UPDATE)
        {
          updateSecondRowInDatabase(getAttribute1(), getAttribute2(), getAttribute3(), getJoinColumn());
        }
    
        super.doDML(operation, e);
      }
    
      private void insertSecondRowInDatabase(Object value1, Object value2, Object value3, Object joinColumn)
      {
        PreparedStatement stat = null;
        try
        {
          String sql = "Insert into table_name (COLUMN_1,COLUMN_2,COLUMN_3,JOIN_COLUMN, HIDDEN_COLUMN) values ('" + value1 + "','" + value2 + "','" + value3 + "','" + joinColumn + "', 1)";
          stat = getDBTransaction().createPreparedStatement(sql, 1);
          stat.executeUpdate();
        }
        catch (Exception e)
        {
          e.printStackTrace();
        }
        finally
        {
          try
          {
            stat.close();
          }
          catch (Exception e)
          {
            e.printStackTrace();
          }
        }
      }
    
      private void updateSecondRowInDatabase(Object value1, Object value2, Object value3, Object joinColumn)
      {
        PreparedStatement stat = null;
        try
        {
          String sql = "update table_name set column_1='" + value1 + "', column_2='" + value2 + "', column_3='" + value3 + "' where JOIN_COLUMN='" + joinColumn + "'";
          stat = getDBTransaction().createPreparedStatement(sql, 1);
          stat.executeUpdate();
        }
        catch (Exception e)
        {
          e.printStackTrace();
        }
        finally
        {
          try
          {
            stat.close();
          }
          catch (Exception e)
          {
            e.printStackTrace();
          }
        }
      }
    
  • I have a column with two values, separated by a space, in each line. How to create 2 new columns with the first value in a column, and the second value in another column?

    I have a column with two values, separated by a space, in each line. How do I create 2 new columns with the first value in one column and the second value in another column?

    Add two new columns after than the original with space separated values column.

    Select cell B1 and type (or copy and paste it here) the formula:

    = IF (Len (a1) > 0, LEFT (A1, FIND ("", A1) −1), ' ')

    shortcut for this is:

    B1 = if (Len (a1) > 0, LEFT (A1, FIND ("", A1) −1), ' ')

    C1 = if (Len (a1) > 0, Member SUBSTITUTE (A1, B1 & "", ""), "")

    or

    the formula of the C1 could also be:

    = IF (Len (a1) > 0, RIGHT (A1, LEN (A1) −FIND ("", A1)), "")

    Select cells B1 and C1, copy

    Select cells B1 at the end of the C column, paste

  • How do rotate on a date and see the sum of the value of another column

    Hello

    I searched through the forum and cannot find a query similar to my question feels so post this new thread.

    First of all, it is probably useful indicating that I am using Oracle 10 g.

    I have a table that is used to store the details of the booking (essentially a booking system) and I would use this data to display the details of the customers stay on one line.

    The table has the following columns:
    BOOKING_ID
    CUSTOMER_ID
    DATE_OF_ARRIVAL
    NUMBER_OF_NIGHTS
    NUMBER_OF_PEOPLE
    Some example records could be:

    BOOKING_ID    CUSTOMER_ID     DATE_OF_ARRIVAL    NUMBER_OF_NIGHTS   NUMBER_OF_PEOPLE
    --------------------------------------------------------------------------------------------
    1                    201      13-JAN-2010        5                   1
    2                    202      13-JAN-2010        3                   2  
    3                    202      13-JAN-2010        4                   1
    4                    203      15-JAN-2010        2                   3
    On this basis I would like to display the output so that I can show a sum of the NUMBER_OF_PEOPLE reserved to per customer per day, as such:
    CUSTOMER_ID     13-JAN   14-JAN   15-JAN   16-JAN   17-JAN   18-JAN   19-JAN 
    -----------------------------------------------------------------------------------------
    201                   1       1        1        1        1        0        0
    202                   3       3        3        1        0        0        0
    203                   0       0        3        3        0        0        0
    I watched analytical functions in the documentation and several books of Oracle that I have, but have so far struggled to find how to make the performance desired. Even using the excellent response to the previous post on the forum, I got Re: how to count the occurrence of a date in a range I was not able to get a feasible request.

    Any help or advice would be much appreciated.

    Kind regards
    Stu

    Published by: macmanxie on January 10, 2011 21:16

    Hello

    macmanxie wrote:
    ... The suggested approach goes only to return a number if the DATE_OF_ARRIVAL corresponds to the date in the CASE statement, however I have the added complexity of wanting to show a count of all the days that the customer is booked, for, by making use of the NUMBER_OF_NIGHTS. I tried to use some of the examples provided on morganslibrary.org, for example:

    sum( CASE WHEN  TRUNC (arrival_date) between '01/13/2011' and TRUNC (arrival_date+no_of_nights) THEN nvl(no_of_people,0) ELSE 0 END) AS jan_13
    

    but this does not produce the desired result.

    You check if arrival_date is between January 13 and arrival_date + no_of_nights (as if the arrival date could all be posterior to the arrival_date + no_of_nights).
    Are not really interested in whether or not January 13 ib between arrival_date and arrival_date + no_of_nights?

    NVL ( SUM ( CASE
                    WHEN  TO_DATE ( '01/13/2011'
                           , 'MM/DD/YYYY'
                         )          BETWEEN  TRUNC (arrival_date)
                             AND       TRUNC (arrival_date) + no_of_nights
                 THEN  no_of_people
             END
           )
        , 0
        )          AS jan_13
    

    Always format your code. It is important to format your code if you are the only who who will ever read but it is even more important if you are posting on a forum like this and ask other people to read.
    Not to compare the DATEs in the strings; explicitly use a conversion function, like TO_DATE, above, where necessary.
    Both
    SUM (NVL (x, 0)) and
    NVL (SUM (x), 0) get the same results, but the latter is more effective. If you have 1000 lines, the first way is calling NVL 1000 times, but the second way is calling only once.

    If your previous thread
    Re: How to count the occurrence of a date in a range
    Gets you the right data, but it has one row for each distinct combination of customer_id and date, then you can switch it to a form that contains a line by the customer and another column for each date.

    If you need help, post CREATE TABLE and INSERT statements for some examples of data and outcomes from these data. The post you are trying better to a request, including a subquery that gets no cross-the raw table dynamic results.
    There will be a fixed number of columns in the output swing? If this is not the case, how do you deal with that? Which of these options in the thread I posted above)
    Re: County report and the sum of the number of rows by multiple columns
    ) is best for your needs? Than others is acceptable?

  • Not how to show a part of online data in a table in another table with even no column?

    I need to display the data from certain rows in a table in another table with the same numbers of columns and main table must be disabled. Could someone advice how to do this?    Data in the table are from the microprocessor and is intended the user can see and edit only some data.

    If someone can show me some advice, it will be a great help.

    Kind regards

    Annemariehoeven

    Disable a table: SetInputMode (panelHandle, controlID, 0);  ('1' to re - activate).

    Hide a table: SetCtrlAttribute (panelHandle, controlID, ATTR_VISIBLE, 0); ('1' to show it again).

    These commands are valid for each type of control.

    To extract values from the table, you can just use GetTableCellVal or GetTableCellRangeVals: If the range of cells has the same data type, you can use the second command which is faster; If the cells are different (for example digital and channels) you must solve each of them individually. The use of the Clipboard doesn't have this limitation.

  • Make it visible only works field in the first row, not added lines

    I have a dynamic form that I can add lines. It is 3 columns, the first being a DOF that fills the second column DDL. The 3rd column is a hidden field that shows once made a choice in the second DDL. It works very well in the original line, but it will become visible in the rows that are added.

    This is my code for the second DDL:

    If

    (this.rawValue ! = 1)

    {

    Form1. Page1.OrderSection.OrderItems.condition.presence

    = 'visible ';

    }

    on the other

    {

    Form1. Page1.OrderSection.OrderItems.condition.presence

    = 'hidden ';

    }

    Must be set up as a sort of loop maybe? I'm sure it has something to do with my being a dynamic path name path. Not really sure at this point what to look at to make it work. I don't know how or if I can get my file here. If someone can tell me how to fix it, or I can email to someone for help.

    Thanks in advance.

    Each object must have a unique name. To accomplish the repeating subform Gets a number of occurrence, so assuming the OrderItems is the repeated subform expression to get the object will be OrderItems [occuranceNumber]. Condition

    If you need to change your code to access the instance on the right:

    'visible ';

    xfa.resolveNode ("form1. ("Page1.OrderSection.OrderItems [' + this.parent.index + '"] '). Condition.presence =

    Assuming that you are running this code on an object inside the subform. The this.parent.index will give you the index number of the subform that you are.

    Hope that helps

    Paul

  • merge multiple lines in a row (but multiple columns)

    How to merge multiple lines in a row (but several columns) effectively.

    For example

    IDVal IDDesc Id_Information_Type Attribute_2 Attribute_3 Attribute_4 Attribute_5 Attribute_1 IdNum
    23 asdc 1 location USA NM ABQ four seasons 87106
    23 asdc 1 Stats 2300 91.7 8.2 85432
    23 asdc 1 Audit 1996 June 17 1200
    AAFC 65 2 location USA TX AUS Hilton 92305
    65 AAC 2 Stats 5510 42.7 46 9999
    AAFC 65 2 Audit 1996 July 172 1100


    where different attributes mean different for each Information_type.
    For example, for Information_Type = location
    Attribute_1: countries
    Attribute_2: State and so on.


    For example, for Information_Type = Stats
    Attribute_1 designates the Population
    Attribute_2: percentage of ethnicity American and so on.

    I want to create a view that shows as below:

    IDVal IDDesc IDNum country state city hotel ZipCode American Population % other % area Audit year Audit AuditMonth Type AuditTime
    23 asdc 1 USA NM ABQ reviews 87106 2300 91.7 46 85432 1996 June 17 1200
    AAFC 65 2 USA TX AUS Hilton 92305 5510 42.7 46 9999 1996 July 172 1100


    Thank you

    Hello

    This is called pivoting . The FAQ forum has a section on this subject: {message identifier: = 9360005}

    I hope that answers your question.
    If not, post your best attempt, as well as some examples of data (CREATE TABLE and INSERT, only relevant columns instructions) and also publish outcomes from these data. (See you the desired results, but they are very difficult to read because they are not formatted. Use \.

     tags, as described in the forum FAQ, below.)
    Explain, using specific examples, how you get the results you want from the data given.
    Always say which version of Oracle you're using (e.g., 11.2.0.2.0).  This is always important, but especially so with pivots.
    See the forum FAQ {message:id=9360002}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
    
  • The letters on my keyboard on the screen are passed. that is the A is now in the first row of letters, the M is in the middle line. How can I change?

    The letters on my keyboard on the screen are passed. that is the A is now in the first row of letters, the M is in the middle line. How can I change? I don't know how he has changed as a first step.

    Try the settings > General > keyboard > English > typing on the QWERTY keyboard. -AJ

  • ListField.drawListRow only draws a line in the first row, all the lines.

    I'm close. ListField.drawListRow is called for every row without problem, but the two graphics.drawLine only are displayed (shot) in the first row at the point of coordinates noted.

    I thought that each line would get the two drawn drawLines?

    Graphics.Clear is called correctly (as a test only - I have commented out them as well, but not changes).

    How can I get the two Graphics.drawLine at the bottom of the method called for each line, correctly?

    public void drawListRow(ListField listField, Graphics graphics, int index,
            int y, int width) {
        Logger.debug("CoffeeStoreContent [drawListRow] y: " + y + " width: " + width);
        /*
         * Top Margin
         */
        y += appGraphics.calcHiRes(6);
    
        int[] colors = appGraphics.getColorPalette(sportTitle);
    
        /*
         * Get the current CoffeeStore object.
         */
        CoffeeStore currentRow = (CoffeeStore) get(listField, index);
    
        StringBuffer subline = new StringBuffer(currentRow.getSource());
        subline.append(Characters.SPACE);
        subline.append("|");
        subline.append(Characters.SPACE);
        subline.append(currentRow.getDateAgo());
    
        int HiX = 43;
    
        if (graphics.isDrawingStyleSet(Graphics.DRAWSTYLE_FOCUS)) {
            graphics.clear();
            graphics.setColor(AppGraphics.YELLOW_HIGHLIGHT);
            graphics.fillRect(0, (index * listField.getRowHeight()),
                    listField.getWidth(), listField.getRowHeight());
    
            graphics.setFont(font);
            graphics.setColor(Color.BLACK);
            graphics.drawText(currentRow.getLinkText(), HiX, y, 0, width);
    
            graphics.setColor(AppGraphics.TEIGHT);
            graphics.drawText(subline.toString(), HiX, (y
                    + graphics.getFont().getHeight() + 2), 0, width);
        } else {
            graphics.clear();
            graphics.setColor(colors[0]);
            graphics.fillRect(0, (index * listField.getRowHeight()),
                    listField.getWidth(), listField.getRowHeight());
    
            graphics.setFont(font);
            graphics.setColor(AppGraphics.TSIX);
            graphics.drawText(currentRow.getLinkText(), HiX, y, 0, width);
    
            graphics.setColor(Color.WHITE);
            graphics.drawText(subline.toString(), HiX, (y
                    + graphics.getFont().getHeight() + 2), 0, width);
        }
    
        graphics.setColor(colors[2]);
        graphics.drawLine(0, 50, width, 50);
        graphics.setColor(colors[3]);
        graphics.drawLine(0, 51, width, 51);
    }
    

    No - only y + 50 is enough.

  • Filter the rows based on another column

    Hello

    I have a table like this:

    user_idteamsla_teamrownum
    11one01
    22one02
    33b13
    44b14
    55c3

    5

    I want a list of the first order of 3 users of sla_team.

    If 2 or more users have the same sla_team, must list both of them.

    In this case, I want to return user_id: 11, 22, 33, 44

    A way to do it is like this:

    Select *.

    table

    where sla_team < = (select max (sla_team) in the table where rownum < = 3)

    But my table is bigger and more complex query.

    Any other sugestion?

    Thank you and sorry for my bad English.

    Hello

    Whenever you have a problem, please post a small example data (CREATE TABLE and only relevant columns, INSERT statements) of all the tables involved, so that people who want to help you can recreate the problem and test their ideas.

    Also post the exact results you want from this data, as well as an explanation of how you get these results from these data, with specific examples.

    Always say what version of Oracle you are using (for example, 11.2.0.2.0).

    See the FAQ forum: Re: 2. How can I ask a question on the forums?

    This sounds like a job for a Query of Top - N, like this:

    WITH got_r_num AS

    (

    SELECT table_x. *- or whatever the columns that you want to

    , EVALUATE () DURING (ORDER BY sla_team) AS r_num

    FROM table_x

    -WHERE... - If you need any filtering, put it here

    )

    SELECT *- or the list of all columns except r_num

    OF got_r_num

    WHERE r_num<=>

    ORDER BY r_num

    ;

  • AF:Switcher, handfuls of line column values based on another column in the table

    Hello

    I have a question if you can help me on this. It's on af:switcher.

    What I'm trying to do this - is in a table of the adf, based on the value of a column, I want another column to display as a link or not.
    For example, if the status column is 1, then the id column display as a link (I just put a h:outputLink around outputText to do), if it is then show him without bond.

    For this I put two different facets and opportunities switcher to decide what facet of show which line.

    BUT what is happening is that only on opportunities is made. Either / or scenario. It is not made each line according to the value of the status column.

    What is planned.

    I just tried with the dept table.

                    
                    
                    
                      
                    
                    
                    
                        
    
                      
                    
    

    The lines for which the deptno > 20, I wanted to display the pass as link and for the deptno<=20, log="" will="" be="" an="" input="" text.="" it="" works="" fine="" for="" me.="" probably,="" you="" may="" need="" to="" get="" rid="" of="" h:outputlink="" and="" use="" commandlink="" golink="">

    Arun-

  • Copy data from one column to another column in the form of customization

    Hi all

    I need, it's that I need to copy the value of a column to another column.

    But the two columns are different from the TAB

    Who be used, please send me the code.

    Thank you

    And can you describe your condition more clearly?

    My question was... you try to copy the incident followed summary on behalf of the task? In this case, you will need to find the event that triggers ONCE you have entered your resume. Enter in the preview, select display custom events and see what events are triggered. These are the 'moments' that you can use to add additional programming.

Maybe you are looking for