Output of calcuations that appear on different lines

I have a workbook that I gives me a few datapoints and have used calculations to achieve my desired goal. I am very close, but now the resulting data not appearing like I like it. I have 3 types of main columns: week #, total for each chemistry groups, sum for the entire week (in theory). I want each week to have a single line of data, what I get is each datapoint appearing on its own line.

What I have:
Week | -level 1 | -level 2 | -level 3-|-sum
0901 | -100-| - -| - -| -100
0901 | - -| -250-| - -| -250
0901 | - -| - -| -175-| -175
0902 | - -| -325-| - -| -325
0902 | - -| - -| -100-| -100

What I want:
Week | -level 1 | -level 2 | -level 3-|-sum
0901 | -100-| -250-| -175-| -525
0902 | - -| -325-| -100-| -425


Calculation of ChemSort:
DECODE (DECODE chemistry, LESS (chemistry, 0), "Ne Chem", (chemistry, LESS (chemistry, 30), 'level 1', DECODE (chemistry, LESS (chemistry, 59), 'level 2', DECODE (chemistry, LESS (chemistry, 100), "' level 3 ' Tier 4'))))

Sum of the levels of chemical composition is different:
DECODE (ChemSort, 'level 1', SUM (Qty Trans))
DECODE (ChemSort, 'level 2' SUM (Qty Trans)), etc...


You can provide any help would be greatly appreciated!

Hello

Don't you want to just the AMOUNT outside the calculation.

for example. SUM (DECODE (ChemSort,'Tier 1', Trans Qty))

While you declare is just grouped by week so you should have a line per week.

Rod West

Tags: Business Intelligence

Similar Questions

  • Display problem. The images have random black or white boxes that appear at different zoom levels. Picture is ok 100%

    I have recently updated my iMac last Adobe CC retina and now experience display problems. The images have random black or white boxes that appear at different zoom levels. Images ok 100% and some other levels of zoom.

    I've read other posts with the same questions.

    When Adobe gets out a fix, as this seems to be an error as Adobe making a lot of different HW platforms.

    Hi Martin,

    Please go to Preferences > Camera Raw and uncheck use display adapter. Click OK.

    Restart Photoshop and check for the issue.

    ~ UL

  • Models that appear on different pages.

    Hi guys,.

    I m facing a problem in the site I m creation that drives me a little crazy. Recently, I had to make a few minor changes on the web template. And after that, I have updated the links, as usual, but for some reason, the home page retains the previous design of the model. All other pages look very well, but it s as if the updated home located. I checked the source code, but both pages are oriented exactly on the same model, I m so no idea on the issue.

    http://www.xmobots.com/new/versions/us/USHome.html

    He comes to the House. If you click on the item "Company" in the menu the first element will be the Structure.

    If you go to any other page you will see the same item in the menu is now "About Us", and headers menu is closer to the logo, so some movement occurs.

    This locally produced also it s so not a refreshing question of the server.

    If anyone could provide guidance on the issue i´ll be very willingly.

    If the home/index page is based on the model, go to the page and do edit > templates > page update of the model. Then save and load the page.

    In Design mode (no), you can see the name of the template on which a page is based on a yellow label at the top right of the window in Design view. This will help confirm you that the page is based on the model you are talking about.

    If you have made changes in the model with the open Index page, it is possible that the pages that were not open to update in the background and the Index page, open, has been updated but not registered.

    Another possibility that would occur when the index page and content pages are at different levels in the file/page in the site structure has to do with the links that appear in the CSS. I'm not aware of the changes that you made, but your CSS seems to be mainly on the page template, so on each child page, as well as the links would not settle for a page sitting at another level in the hierarchy. For this kind of difficulty, I recommend you to move all your styles in an external stylesheet that you then bind to the model, update the site with the changes made to the model and you should see the changes fall back in place correctly.

    Beth

  • Satalite L500-1R3 red lines appear at different locations, watching movies on TV

    When im connected to my computer laptop hd tv with hdmi cable when watching films, there is a red line that appear in different places all the time the film is going.
    Sometimes, they would change to blue line according to the colors in the movie.
    Also the film for a s-2 slows down randomly or going fast as if it were a documentery and not a movie.

    Same goes with the vga output only that I don't have the red lines on the screen.
    And why quelquesUne my lap top don't get recognized by 2 / 3 output from the HDMI to your TV.

    BTW I checked it 2 TV so is not the problem of the tv and it is not the problem of cable as well since the ps3 connection and play does give me no problem as I mentioned above.

    I am running windows 7 64 bit with all the drivers updated.

    Hope some of you had this problem and would be able to help me.

    Also the face recognition almost never works: p

    Have you noticed the same sense on s to laptop screen?

    I think you should check the different HDMI cables and should check the HDMI settings and the different ports of the TV, even if the HDMI cable works very well with the PS3.
    The fact is that these lines does not appear on the TV using the VGA port and VGA cable so it has something to do with port HDMI, TV or the cable.

    In addition, you should check if this issue would be reading different movies from different sources (HDD, DVD, etc.)

    Last but not Lea I would recommend updating the graphics card driver.
    It seems to be an INTEL GL40 graphics card.
    Try a page Intel driver

  • By comparing the Dates in a group of data (different lines)

    I have a requirement where I have to compare dates in a dataset for each employee.  The data looks like this:

    WITH test_data AS

    (SELECT the '1' AS pk, '5900' AS emp_id, '5' AS rec_id, to_date('01-JAN-2014') AS rec_date FROM dual

    UNION ALL

    SELECT '2', '5900', '5', to_date('01-FEB-2014') FROM dual

    UNION ALL

    SELECT '3', '5900', '5', to_date('01-MAR-2014') FROM dual

    UNION ALL

    SELECT '4', '5900', '5', to_date('01-JAN-2014') FROM dual

    UNION ALL

    SELECT '5', '5900', '6', to_date('06-JAN-2014') FROM dual

    UNION ALL

    SELECT '6', '5900', '6', NULL FROM dual

    UNION ALL

    SELECT '7', '5900', '6', to_date('01-JUL-2014') FROM dual

    UNION ALL

    SELECT '8', '5900', '7', to_date('29-JAN-2014') FROM dual

    UNION ALL

    SELECT '9', '5900', '7', to_date('29-SEP-2014') FROM dual

    UNION ALL

    SELECT '10', '5900', '7', to_date('01-OCT-2014') FROM dual

    UNION ALL

    SELECT '11', '8595', '5', to_date('01-SEP-2014') FROM dual

    UNION ALL

    SELECT '12', '8595', '6', to_date('05-SEP-2014') FROM dual

    UNION ALL

    SELECT '13', '8595', '7', to_date('30-SEP-2014') FROM dual

    UNION ALL

    SELECT '14', '8595', '7', NULL FROM dual

    )

    REC_ID column is composed of 3 different types of records, which must satisfy this requirement:

    REC_ID 5 acts as point of departure, and REC_ID 6 must have a REC_DATE within 7 days of REC_ID 5 REC_ID 7 must have a REC_DATE within 30 days of REC_ID 6.

    • If the requirements are any record in REC_ID 5 acts like zero day or the starting point;
    • Any record in REC_ID 6 must be within 7 days of the date of REC_ID 5;
    • Any record in REC_ID 7 must be within 30 days from 6 REC_ID.

    My results:

    Expected results - satisfactory records

    EMP_ID

    DATE_1

    DATE_2

    DATE_3

    5900

    1 January 14

    6 January 14

    29 January 14

    8595

    1 sep-14

    5 sep-14

    30 sep-14

    I don't know how to compare dates in a dataset that are on different lines.  I thought using self-joins, query using the window as rank (), factoring functions, but I'm stuck pretty quickly.

    I appreciate all help.  Thank you!

    Aqua

    Hello

    AquaNX4 wrote:

    WOW odie_63: it would be a blessing if I was... but unfortunately, I'm on 10 gr 2.  That would have been great!

    Frank Kulash:

    I'm stuck (mentally) to the fact that there is an amount without discernment of records in the base table for each type of REC_ID.

    Some employees have 5 folders for REC_ID, 10 REC_ID 6 and 7 for REC_ID 7, which leaves me confused in how many self-joins I should do, or if it is at all possible.  I did a lot of arithmetic of dates with the data on the same line and certain ranks () functions for data residing on different lines, but this 1 seems to confuse me...

    I ran 1 self-join as below to see what it looks like and it confused me even more because I know the timestamp of the arithmetic in where clause still will not produce data as I want...  I am now trying another way...

    SELECT td2.rec_id,

    TD2.emp_id,

    TD2.rec_date

    Of

    test_data2 td2

    LEFT JOIN test_data td1 ON td1.emp_id = td2.emp_id


    It's a good start.

    You want an inner join, however, not an outer join, not you?  Outer join means "include td2 lines if they have data in the corresponding TD1".  If I understand the question, you are only interested in cases where it is matching data.

    Here's a way to do it:

    WITH joined_data AS

    (

    SELECT d5.emp_id

    d5.rec_date LIKE date_1

    d6.rec_date AS date_2

    d7.rec_date AS date_3

    ROW_NUMBER () OVER (PARTITION BY d5.emp_id

    ORDER BY d5.rec_date

    d6.rec_date

    d7.rec_date

    ) AS r_num

    OF test_data d5

    JOIN test_data d6 ON d6.emp_id = d5.emp_id

    AND d6.rec_date > = d5.rec_date

    AND d6.rec_date<= d5.rec_date="" +="">

    JOIN test_data d7 ON d7.emp_id = d6.emp_id

    AND d7.rec_date > = d6.rec_date

    AND d7.rec_date<= d6.rec_date="" +="">

    WHERE d5.rec_id = '5'

    AND d6.rec_id = "6"

    AND d7.rec_id = "7"

    )

    SELECT emp_id, date_1, date_2, date_3

    OF joined_data

    WHERE r_num = 1

    ;

    The subquery joined_data find all combinations of rows that meet the criteria.  We want to only 1 line by emp_id, so I used ROW_NUMBER assign unique r_nums (starting at 1) to all lines with the same emp_id and then, in the main query, rejected all but the 1st row.

    Knapen had a good idea, but it won't work for all cases.  There may be situations where the only combination of rows that meet the criteria does not use the MIN or MAX of dates of one (or several).

  • How to compare two TABLES and different lines of list?

    I have two structural equal paintings aaa and bbb
    that (could) have different lines.

    How can I compare the tables and display different lines?

    Peter

    Something like this->

    SELECT aaa.*,'bbb' "Not present in" FROM aaa
    MINUS
    SELECT bbb.*,'bbb' "Not present in" FROM bbb
    UNION ALL
    (
    SELECT bbb.*,'aaa' "Not present in" FROM bbb
    MINUS
    SELECT aaa.*,'aaa' "Not present in" FROM aaa
    )
    

    Kind regards.

    LOULOU.

  • Gray lines clear that appears when loading Web pages.

    In the little time when I click on a link and Firefox loads the page, there are these small gray lines that appear. (http://prntscr.com/56zhsd) When I bought my computer, there are not. But less than a week, they began to appear and they kept adding just now since.
    I've updated to the latest version of Firefox and I ran it in Safe Mode, no solution.

    You can try to disable hardware acceleration in Firefox.

    • Tools > Options > advanced > General > Browsing: "use hardware acceleration when available.

    You will need to close and restart Firefox after enabling/disabling this setting.

  • Mr President, how can I enter two rows at the same time with different default values that only the first line to use see?

    Mr President.

    My worm jdev is 12.2.1

    How to enter two rows at the same time with different default values that only the first line to use see?

    Suppose I have a table with four fields as below

    "DEBIT" VARCHAR2(7) , 
      "DRNAME" VARCHAR2(50),
      "CREDIT" VARCHAR2(7) , 
      "CRNAME" VARCHAR2(50),
    

    Now I want that when I click on a button (create an insert) to create the first line with the default values below

    firstrow.png

    So if I click on the button and then validate the second row with different values is also inserted on commit.

    The value of the second row are like the picture below

    tworows.png

    But the second row should be invisible. It could be achieved by adding vc in the vo.

    The difficult part in my question is therefore, to add the second row with the new default values.

    Because I already added default values in the first row.

    Now how to add second time default values.

    Concerning

    Mr President

    I change the code given by expensive Sameh Nassar and get my results.

    Thanks once again dear Sameh Nassar .

    My code to get my goal is

    First line of code is

        protected void doDML(int operation, TransactionEvent e) {    
    
            if(operation != DML_DELETE)
                 {
                     setAmount(getPurqty().multiply(getUnitpurprice()));
                 } 
    
            if (operation == DML_INSERT )
                       {
                               System.out.println("I am in Insert with vid= " + getVid());
                           insertSecondRowInDatabase(getVid(),getLineitem(),"6010010","SALES TAX PAYABLE",
                            (getPurqty().multiply(getUnitpurprice()).multiply(getStaxrate())).divide(100));      
    
                           }
    
            if(operation == DML_UPDATE)
                              {                                                    
    
                                 System.out.println("I am in Update with vid= " + getVid());
                             updateSecondRowInDatabase(getVid(),
                                 (getPurqty().multiply(getUnitpurprice()).multiply(getStaxrate())).divide(100));      
    
                              }                      
    
            super.doDML(operation, e);
        }
        private void insertSecondRowInDatabase(Object value1, Object value2, Object value3, Object value4, Object value5)
                  {
                    PreparedStatement stat = null;
                    try
                    {
                      String sql = "Insert into vdet (VID,LINEITEM,DEBIT,DRNAME,AMOUNT) values " +
                 "('" + value1 + "','" + value2 + "','" + value3 + "','" + value4 + "','" + value5 + "')";  
    
                      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 value5)
                  {
                    PreparedStatement stat = null;
                    try
                    {
                      String sql = "update vdet set  AMOUNT='"+ value5+"' where VID='" + value1 + "'";                     
    
                      stat = getDBTransaction().createPreparedStatement(sql, 1);  
    
                      stat.executeUpdate();
                    }
                    catch (Exception e)
                    {
                      e.printStackTrace();
                    }
                    finally
                    {
                      try
                      {
                        stat.close();
                      }
                      catch (Exception e)
                      {
                        e.printStackTrace();
                      }
                    }                  
    
                  }
    

    Second line code is inside a bean method

        public void addNewPurchaseVoucher(ActionEvent actionEvent) {
            // Add event code here...
    
            BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry();
                   DCIteratorBinding dciter = (DCIteratorBinding) bindings.get("VoucherView1Iterator");
                   RowSetIterator rsi = dciter.getRowSetIterator();
                   Row lastRow = rsi.last();
                   int lastRowIndex = rsi.getRangeIndexOf(lastRow);
                   Row newRow = rsi.createRow();
                   newRow.setNewRowState(Row.STATUS_NEW);
                   rsi.insertRowAtRangeIndex(lastRowIndex +1, newRow);
                   rsi.setCurrentRow(newRow);
    
                   BindingContainer bindings1 = BindingContext.getCurrent().getCurrentBindingsEntry();
                   DCIteratorBinding dciter1 = (DCIteratorBinding) bindings1.get("VdetView1Iterator");
                   RowSetIterator rsi1 = dciter1.getRowSetIterator();
                   Row lastRow1 = rsi1.last();
                   int lastRowIndex1 = rsi1.getRangeIndexOf(lastRow1);
                   Row newRow1 = rsi1.createRow();
                   newRow1.setNewRowState(Row.STATUS_NEW);
                   rsi1.insertRowAtRangeIndex(lastRowIndex1 +1, newRow1);
                   rsi1.setCurrentRow(newRow1);
        }
    

    And final saveUpdate method is

        public void saveUpdateButton(ActionEvent actionEvent) {
            // Add event code here...
    
            BindingContainer bindingsBC = BindingContext.getCurrent().getCurrentBindingsEntry();      
    
                   OperationBinding commit = bindingsBC.getOperationBinding("Commit");
                   commit.execute(); 
    
            OperationBinding operationBinding = BindingContext.getCurrent().getCurrentBindingsEntry().getOperationBinding("Commit");
            operationBinding.execute();
            DCIteratorBinding iter = (DCIteratorBinding) BindingContext.getCurrent().getCurrentBindingsEntry().get("VdetView1Iterator");// write iterator name from pageDef.
            iter.getViewObject().executeQuery();  
    
        }
    

    Thanks for all the cooperation to obtain the desired results.

    Concerning

  • Is it possible to convert the standard numbered list to the list that appears on the same line a right after another? As indicated in 1. Text goes here, 2. Text goes here, 3. Insert text here

    Is it possible to convert the standard numbered list to the list that appears on the same line a right after another?

    Instead

    1. Insert text here
    2. Insert text here
    3. Insert text here

    This

    1 text goes here, 2. Text goes here, 3. The text here.

    This revised list can take multiple lines.

    I use InDesign CC2014 - if that makes a difference.

    the only way is to convert numbered in the text (select numbered list > ctrl (or right click) > bulleted & numbered lists > convert numbered text).

    Then, with search - replace, you can change the paragraph returns in space (or in space by commas as in your example)

  • How to create a button with rollover that appears in a different place than the button when you move?

    Hello

    How to create a button with rollover that appears in a different place than the button when you move by using only the Muse (reversal may be a different shape and color of the button). I managed to do it using Photoshop and the separate layers and import it, but it is not a good solution. All suggestions will be welcome.

    Thank you

    You can try to use the widget of the Composition of the ToolTip. In this way, the trigger area is isolated and a "State of reversal" can be placed anywhere on the screen (compared to the trigger).

    • Remove the two triggers additional default
    • Set to display the targets on working capital
    • Select hide all initially.
  • How can I get rid of the practice (news this morning) of messages that appear at the bottom of the Inbox message list when I don't want to see them?

    Until this morning, I could the cursor up and down on my list of the Inbox for messages I wanted to open (or delete without opening). Now, each message darn, the cursor stops on - or sometimes even just past above - appears below the line at the bottom of the list of messages. This means that I can't see so many messages listed at the same time as I could yesterday.
    I can get rid of the line (and the message that open automatically below) only by moving the cursor down on the line. I don't want to do that with every message that I make a break on or exceed. If I want to open a message, I'll open - it is not so difficult.
    I imagine that some people wanted this feature or that it would not have been installed. All I want is to be able to turn it off.
    Thanks for any help.

    Re; I guess that some people wanted this feature or that it would not have been installed. All I want is to be able to turn it off.

    There is no such feature added, because it would be ridiculous to implement.
    The problem you are experiencing is not a problem with Thunderbird.
    It is likely to be your mouse, mouse pad or keyboard.

    Emails do not open without a statement to open. That statement comes from the mouse, mouse pad, keyboard, then this is where to look.

    Either you're inadvertently clicking or your settings are too sensitive or maybe something is stuck, your mouse/keyboard mat is recording your action and act on it.
    Action comes from the mouse or carpets to mouse or keyboard and the computer includes an action is required and performs this action in Thunderbird.

    Determine if what you are doing when it occurs, what method to use and check the settings.

    I would go in your computer control settings to get for example: mouse pads
    and check the settings for sensitivity.

    If you use a mouse pad, it's too easy to press slightly harder and move cursor is interpreted as a left click. Check the sensitivity settings.
    Maybe your keyboard should be cleaned as keys become sticky.
    If you use a mouse, then make sure that your hands are not inadvertently pressing the buttons, the checksensitivity settings or maybe the mouse begins to fail, if not too sentive.

  • I found the show/hide button toolbars, but you should know how to REMOVE toolbars that appear on this list?

    I found the show/hide button toolbars, but you should know how to REMOVE toolbars that appear on this list?

    Is attached a screenshot of my screen with the context menu to show/hide tabs. I want to delete some of them and let others. Please help me to know how. Thank you!

    Hmm, maybe this "one-time" imported into the new preference? Try this:

    (1) in a new tab, type or paste Subject: config in the address bar and press ENTER. Click on the button promising to be careful.

    (2) in the search above the list box, type or paste the cust and make a pause so that the list is filtered

    (3) double-click the preference of browser.uiCustomization.state and the content must be highlighted in a small dialog box.

    (4) copy the whole line and paste it into Notepad and save it as a backup.

    (5) in Firefox, click on the button '3-bar' menu > developer > Notepad. Remove the comment that appears and paste data preferably, that must appear on a long line. Click on the "Pretty Print" button to make it more readable.

    So I hope that you can spot the extra toolbars and change them out, taking care to preserve the commas between the elements.

    I don't have the extra toolbars in mine, but I copied and pasted back this spaced format and Firefox was able to handle it well. I went into customize and moved a button, and when I left, Firefox has rewritten the preference set as a single line. Assuming that yours works fine, then you can get rid of the backup from step (4).

  • This is what google problem or forefox. no example that appears once I have started typing a question

    I have long had only to start typing, and most of the time I could choose from a list that appears below. It has not appeared since I had to download a new version of Firefox. I don't know if it is a problem of Google or Firefox.

    When you type?

    Search box of Firefox search bar (see screenshot) generally has suggestions, but they can be disabled. To do this, you can check by clicking on the 'g' icon to expand the menu drop-down, then choosing Manage search engines.

    If you mean on the site of Google, if Google detects a slow connection, it can turn off the usual 'instant prediction results' research. You can go to Google search parameters and this parameter to be still on the force. https://www.Google.com/preferences

    If the problem is in the address bar of Firefox, which normally makes suggestions of your history and bookmarks, it's different. See: Awesome Bar - find your Firefox bookmarks, history, and the tabs in the address bar.

    Is this one of them?

  • How can I clear my card data that appears under the search categories cards?

    How can I remove card slots that appear under the search card categories? I have not saved favorites and I already deleted locations lately, but for some reason any previous locations appear under the different search category.

    Click on "Favorites" you show in your screen shot with zero places.

    Then, click "Recent" down to the Center.

    Then click on 'Clear' at the top left.

  • WNR2020 - setting up the Web page that appears when you can access the guest network

    Someone knows how to set the Web page that appears when you access the network of comments? I use the WNR2020 router. Thank you very much.

    It can be done by using a different material.

    Above all, you will be able to find this feature in our product business and it's called the HTTP redirect.

    You can check some Points of access such as WAC720, WAC730.

Maybe you are looking for

  • My SMTP server password stopped working

    I use Firefox and Thunderbird and up-to-date. Now, when I try to send an email, I get a message "connect to the SMTP server of . GMail.com failed. "This looks like a Thunderbird message. I've had trouble now with several changes to my GMail account w

  • Where is my option to quit smoking?

    When I first charger of Firefox for android and makes my default browser, I had an option to quit smoking. It disappeared after it crashed when opening a Google map page. I sent a report but you want to know how to get that back. I try to do everythi

  • Where can I get 12 of Firefox?

    Where can I get 12 of Firefox? Only the 14 version is available and my client require 12 v

  • Apple Push prevent itunes from opening

    Hi, I've just upgraded to ios 9 on my iphone 5s and itunes on my machine windows 8.1 12.3. If I open itunes it freezes and does not open even if it is running in the Task Manager. As soon as I kill apple push itunes opens. Does anyone have a solution

  • collection of regular expression match

    In annexed "regex test.seq", I'm trying to copy a game collection in a table "for each" on all mathes. Use the existing (System.Text.RegularExpressions.MatchCollection) Object. CopyTo (System.Array, Int32) What I am doing wrong? An exception occurred