Split calcutated keyfigures itnto two columns depending on their value

Hi everybody
I have the following request:
During runtime of a query I calculate the difference between two values (keyfigures). In another column I should show the sum of those differences if they are lower than X (lets say lower thant 2) and in a third column the sum of those values if they are greater than X (lets say greater equal 2). But and this is important I only have to show the overall sum of it. There is no possibility to show every single entry of the data as it is over a million records.
01: type
02: contract
03: sum1
04: sum2
05: difference between sum1 and sum2
06: differences ge 2
07: differences lt 2     
Example Data:
01 *  02.*  03 * 04  
A   *   1  *   20  *  19                                             
A   *   2  *    50 *   48                             
A  *    3  *   10   *   6                                 
B   *   4  *     9 *     7                                
B   *   5   *  25 *   24                                             
so for type A the differences are 1, 2 and 4 and for type B the differences are 2 and 1. So in the result lne I should have for A a columne that shows 1 for the difference lower than 2 and in the other column 6 for the two differences that are greater than 2 etc.
what the report should show:
001    003 004  005  006  007
A   *   80 *  73 *  7  * 6  *  1
B   *  34  *  31 *  3  * 2  *  1
How can I realise this splitting of the calculated keyfigure into two columns? The X is a Variable on the selection screen so the user can select how he wants the values to be splitted.
Can I get the keyfigures to behave like this or do I have to do the calculations already during the dataload  and save the difference as an infoobject and use it as characteristic in the query?  I would like to avoid this if possible.
Thanks for your ideas and help!
Have a great day
best regards
Christophe

Hi,
Yes ofcourse you will get this in query designer
suppose i have data like
salary
10
20
30
40
50
now i want to split this into 2 coloumns like >25 into one column <25 into another column
first salary
10
20
30
second salary
40
50
in first column take (salary < 25)*salary
in second column take (salary > 25)*salary
why we are multiplying means > value gives 1 if it is ok and 0 if it not ok in order to get data we multiply with salary.
goto query properties suppress zeroes.
Assign points if it helps,
thanka,
pavan.

Similar Messages

  • Error when splitting a Table into two columns - Please help!

    Hi!
    I have created a table in which I have created a header which has been split into 3 parts conisting of 2 columns. These all work fine. However, when I try to split the row below the header row into 2 columns, it does so but, in a way, connects the line inbetween the two columns with the line inbetween the two columns above and will not allow me to move it left or right by manually changing specs or dragging the line. Please help! (I'm using CS5 by the way!) Thank you!

    I suggest you begin with a pre-built CSS Layout.  DW has several to help jump start your projects.  Go to File > New Blank Page > HTML.  Select a layout from the 3rd panel and hit CREATE.  See screenshot.
    Save this layout as test.html and begin building your prototype page saving and validating code often during your work sessions.
    Code Validation Tools
    CSS - http://jigsaw.w3.org/css-validator/
    HTML - http://validator.w3.org/
    Good luck with your project!
    Nancy O.

  • How can I split a header in two columns?

    Hello, for the past hour I've been trying to figure out how can I split/divide a header or footer in to two columns and then align text in the left collumn to left and the text in the right column to right.
    For example:
    | Header length                                                                                                   |
    | Left Align                                           |                                           Right Align |
    The only solution I have found was adding a table to the header, but it has some weird padding underneath it, which completely screws up its position in the footer.
    Anyway, I hope this makes sense and someone here knows how to do this.
    I really appriciate you reading this and am looking forward to your replies,
    James.

    You don't need a table.
    Menu > View > Show Ruler
    Leave the header left aligned and click on the ruler to create a Centred tab (if required) in the middle and a right hand tab to the right. You change the tabs by right clicking on them and choosing the orientation.
    Then enter your text:
    Left Text [tab] Centre Text (optional) [tab] Right Text
    With Facing pages you can set the Left and Right pages to be different to allow the Page numbers to the outside or inside of the spread.
    Peter

  • Formula to populate one Person or Group column depending on the value of another Person Group column

    I am looking for a way to popluate the Account information of a Person based on another column where there name in another column.  I have Two Columns   "Name" which is a Person or Group information type and User Account which
    is also a Person or Group Information type.  When an Invidividuals name is entered into the Name column, I what the User Account column to prepolulate.

    Hi,
    For your issue, you can automatically populate User Information depending on the value of another Person or Group column by connectting with User Information List or  connectting with User Profile Web Service:
    http://www.wonderlaura.com/Lists/Posts/Post.aspx?ID=172
    http://blogs.technet.com/b/anneste/archive/2011/11/02/how-to-create-an-infopath-form-to-auto-populate-data-in-sharepoint-2010.aspx
    Best Regards,
    Eric
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • How to split rows based on two columns..

    Hi all...
    I have a requirement.
    I have product column, sell, purchace prices..(total of three columns) in a data set.
    my data set is such a way that..if sale price exists...there is no purchase price and vice versa..
    I need too present in a report ,two tables:
    table 1 consists of only Sale price items
    table 2 should contain only Pruchase Items.
    Please see the below picture for clear understanding..
    Is that doable? Where do we need to impose a condition?I tried to impose a condition but,it didnt seem to work
    http://i51.tinypic.com/29xfdc6.jpg
    Please help.

    Can you send me the template and xml file to [email protected]? I can try to help.
    Did you try to filter out the records by the sale price or purchase price column not equal to null?
    Thanks,
    Bipuser

  • How to split 'Full Name' into two columns for 'First' and 'Last' name??

    Any ideas on how to achieve this? http://office.microsoft.com/en-us/excel-help/split-names-by-using-convert-text-t o-columns-HA001149851.aspx

    If:
    A1 = Fistname Lastname
    For firstname:
    (First Name) B1 =SUBSTITUTE($A1," " & $C1, "")
    For the Last name:
    (Last Name) C1 =RIGHT(A1,LEN(A1)-FIND("#",SUBSTITUTE(A1," ","#",LEN(A1)-LEN(SUBSTITUTE(A1," ","")))))
    If
    A1 = Lastname, Firstname
    (Last Name) B1 =SUBSTITUTE($A1,", " & $C1, "")
    (First Name) C1 =RIGHT($A1,LEN($A1)-FIND("#",SUBSTITUTE($A1," ","#",LEN($A1)-LEN(SUBSTITUTE($A1," ","")))))
    Let me know if you need one that traps multiple commas or middle names.

  • Splitting data up into two columns

    Apologies if this is covered previously ( i'm sure it probably is) i've imported .csv into numbers but the first cell contains two pieces of information separated by a space (TI NUMEROLOGY etc) how do I separate into two cells so I can sort data by the different identifers (TI = Title)
    IB 1859060196
    BI PAPERBACK
    AU SHINE
    BC VXFN
    CO UK
    PD 19990923
    NP 128
    RP 9.99
    RI 9.99
    RE 9.99
    PU CONNECTIONS BOOK PUBLISHING
    YP 1999
    TI NUMEROLOGY
    TI YOUR CHARACTER AND FUTURE REVEALED IN NUMBERS
    EA 9781859060193
    RF R
    SG 2
    GC M01
    DE A unique step-by-step visual approach to numerology
    DE characters and compatibility from names and birth dates.

    Hi Alan,
    Another thought. You can sort the data as it is. Click on Reorganize button on the ToolBar:
    To get:
    Every cell starting with TI and a space will come together, and sorted by whatever follows TI and a space.
    However, if it looks nicer to split the entries, use Badunit's formula.
    Alan wrote: "I also clicked on C2 and went to insert/fill/ but the options are greyed out o I can'r apply to all unless I do it manually... and it's a mahoosive file."
      To fill down, click on C2 then drag the white handle down. Or, select the rows that you want to fill before Insert > Fill (Numbers needs to know how far to fill).
    Ian.

  • How to search two columns and return a value in the same row to a cell?

    Identification
    Diameter
    Soak
    3" Tank (inches/kft)
    AWG
    mils
    Code
    Strands
    Shield
    Conductor
    Insulation
    Semi-Con
    Days
    SD
    Injection
    Soak
    Total
    2
    175
    00
    7
    External
    0.288
    0.692
    0.752
    60
    0.4
    3.6
    20.0
    23.6
    2
    220
    00
    7
    External
    0.284
    0.764
    0.864
    75
    0.4
    3.6
    20.0
    23.6
    2
    260
    00
    7
    External
    0.284
    0.844
    0.944
    90
    0.4
    3.6
    21.8
    25.4
    2
    320
    00
    7
    External
    0.288
    0.964
    1.064
    110
    0.4
    3.6
    24.3
    27.0
    2
    345
    00
    7
    External
    0.288
    1.014
    1.114
    115
    0.4
    3.6
    25.6
    29.2
    Length
    3"
    4"
    AWG
    mils
    Soak
    SD
    Injection (3")
    Injection (4")
    650
    2
    320
    I want to input two values, AWG and mils and return the value in the Days column. 
    In the instance of what I am showing ....   AWG=2 AND mils=320 so Soak=110 ....
    I want to search the columns (AWG) AND (mils) to return a value in the column (Days) for that row into cell H10 (Soak)  ...
    So far I have toyed with LOOKUP, INDEX and MATCH ....

    SCW,
    I'm sure there is a clever way to cascade functions to avoid adding an auxiliary column in your practice table, but to me it wouldn't be worth the aggravation. I would add a column that concatenates Columns A & B, AWG & mils. This column can be anywhere and would be Hidden. Let's say your new column is Column N.
    In Column N, fill the body rows with:
    =A&"-"&B
    As good Numbers programming form would indicate, let's name the Practice Table Practices and only put the practices in that table. In another table where you do the lookup, let's call it Program, we will have the calculation/lookup.
    Based on your example, I'd guess that AWG may be in Column D and mils in Column E of your Program table, and the Soak lookup in Column F. If I'm wrong, adjust the column id.
    In Column F, write:
    =OFFSET(Practices::I$1,MATCH(D&"-"&E, Practices::N,0)−1, 0)
    The hyphen in the concatenated representation of the combination of AWG and mils is just tp make it more readable.
    As I'm sure you know, you could use other approaches, but since I had you put your aux column at the end of your Practices table, OFFSET with MATCH is a clean approach. INDEX could be used too.
    Here's an illustration:
    Regards,
    Jerry

  • Update statement conditioned on two columns but for certain values only

    Hi this is my my sample data:
    with Table_1       
    as
          select '20:00' incident_time, 'WEDNESDAY' Day, 'N' Weekend,  '' Weekend_Alt   from dual
          union all
          select '18:00' incident_time, 'SATURDAY' Day, 'Y' Weekend,  '' Weekend_Alt from dual
          union all
          select '19:00' incident_time, 'FRIDAY' Day, 'N' Weekend, '' Weekend_Alt from dual
          union all
          select '11:00' incident_time, 'FRIDAY' Day, 'N' Weekend, '' Weekend_Alt from dual
    select *
      from Table_1I want to perform an update as seen below
    Update Table_1 tt
    SET Weekend_Alt = (CASE WHEN TO_CHAR(tt.day,'fmDAY') IN ('FRIDAY AND TIME >= 19:00','SATURDAY','SUNDAY') THEN 'Y' ELSE 'N' END)
    I realize the syntax is wrong but just want to give you an idea of what I want to achieve.Final Result should look something like this:
    with Table_1       
    as
          select '20:00' incident_time, 'WEDNESDAY' Day, 'N' Weekend,  'N' Weekend_Alt   from dual
          union all
          select '18:00' incident_time, 'SATURDAY' Day, 'Y' Weekend,  'Y' Weekend_Alt from dual
          union all
          select '19:00' incident_time, 'FRIDAY' Day, 'N' Weekend, 'Y' Weekend_Alt from dual
          union all
          select '11:00' incident_time, 'FRIDAY' Day, 'N' Weekend, 'N' Weekend_Alt from dual
    select *
      from Table_1Thanks in advance!!!
    Banner:
    Oracle Database 11g Release 11.2.0.2.0 - 64bit Production
    PL/SQL Release 11.2.0.2.0 - Production
    "CORE 11.2.0.2.0 Production"
    TNS for Linux: Version 11.2.0.2.0 - Production
    NLSRTL Version 11.2.0.2.0 - Production

    with Table_1
    as
          select to_date('01-JUL-2009 20:10','DD-MON-YYYY HH24:MI') incident_date    from dual
          union all
          select to_date('23-MAR-2010 12:12','DD-MON-YYYY HH24:MI') incident_date from dual
          union all
          select to_date('25-JUL-2010 23:30','DD-MON-YYYY HH24:MI') incident_datet from dual
          union all
          select to_date('09-JAN-2010 08:30','DD-MON-YYYY HH24:MI') incident_date from dual
          union all
          select to_date('08-JAN-2010 08:30','DD-MON-YYYY HH24:MI') incident_date from dual
          union all
          select to_date('08-JAN-2010 20:30','DD-MON-YYYY HH24:MI') incident_date from dual
          union all
          select to_date('26-JUL-2010 00:00','DD-MON-YYYY HH24:MI') incident_datet from dual
    select incident_date, to_char(incident_date,'Day'),
        case
            when incident_date between trunc(incident_date,'IW') + 4 + 19/24
                                   and trunc(incident_date,'IW') + 7
            then 'Y' else 'N'
        end
    from Table_1 t;So your update would be
    update table_1 tt
    set weekend_alt =
        case
            when incident_date between trunc(incident_date,'IW') + 4 + 19/24
                                   and trunc(incident_date,'IW') + 7
            then 'Y' else 'N'
        end;But it does lead me to question whether it is a good idea to store this derived data
    Edited by: 3360 on Nov 8, 2011 10:14 AM

  • Compare two columns and match ALL recurring values, not just the first instance

    Hi everybody...
    I was looking for a way to compare values in two columns, identifying every duplicate value instance on a third column.
    Searching around the forums, I found a solution, albeit a partial one; I am using this formula: =IFERROR("Duplicate in row "&MATCH($A,$B,0),"") along column C, to compare values between columns A and B. When applied, the formula will render the first instance where there is a duplicate; unfortunately MATCH will only register the first instance of the duplicated values.
    For example:
    The first value on column A is 'Apple'. On column B there are three instances for the value 'Apple', the formula identifies the first of these values, but not the remaining two.
    I am not an advanced Numbers or Excel user, and the answer to this problem eludes me. I am attempting to compare columns that have no less than 1000 rows each, so you can imagine how, finding a solution to my problem would be really great.
    Thanks in advance,
    Pablo

    Unfortunately I can't see your screenshot, but supposing you have a table like this:
    Col1
    Col2
    1
    3
    Dupe
    2
    4
    Dupe
    3
    5
    Dupe
    4
    6
    5
    7
    Then here is one way to flag the duplicates.
    The formula in C2, copied down, is:
    =IF(COUNTIF($A,$B2)≥1,"Dupe","")
    Then filter on column C for 'Dupe', and copy the values in column B to wherever you need them.
    SG

  • Summing Selected Rows in Column Depending on Value in Another Column

    I'd like to sum only the values in selected rows in a given column depending on the value of another column in the same row. For example, suppose I have a table (please disregard the underscores, needed for correct alignment):
    ___A____B____C___D
    1__5___10___15___0
    2_20___25___30___1
    3_35___40___45___1
    4_50___55___60___0
    5__sum(D=1)
    In cell B5, I'd like to compute the sum of only rows in column B for which the value of the corresponding column D is 1. In this case B5 would be 65.
    How can I do this using functions? Is it possible to do it for a variable range of rows without specifying each row individually?
    Thanks,
    Dave

    You should place your formula to other collumn then calculated ones or in another table. You will be able to calculate whole collumns with: =SUMIF(D;“=1”;B)
    Formula for your example is: =SUMIF(D1:D4;“=1”;B1:B4)
    VB

  • Defining column for chart category values

    Problem
    I want to produce a chart from a table imported from Excel. The data imported perfectly but since the X axis values (just a series of years) are in a column Numbers appears to treat them as another data series, this situation is compounded by the fact some of data columns are non contiguous.
    I've tried creating a new table with just two columns, the labels and values, copied from the original table but the new columns are still treated as two series.
    I tried creating a new table with a header column and row. Then tried referencing one of the value cells in the original table for the header column. That produced a copy of the whole row but no category data.
    Questions:
    Is it possible to define a column as the X axis category labels as you can with Excel charts?
    If not then how do you create a set of X axis values/labels with an imported table.
    Thanks
    RB

    I solved the problem by copying each column and pasting it into Numbers.
    In this way I was able to put the X axis data into the header column without a problem.
    The problem I had must have been caused by opening the excel file with Numbers.
    FYI:
    I tested this with one column of data and the X values.
    Then pasted in the other columns and found that to add the new series to the chart all you have to do is drag the column selection in the table over the newly added columns. Delightfully simple!
    Thanks for suggestion.
    RB

  • Form split across two columns

    I am trying to layout a form split across two columns. Is
    this possible, tables or divs?
    Test
    Page Here
    My test form only submits the fields on the right:
    Phone:
    Email:
    How did you here about us?
    Rich

    Joey,
    Gonna sound dim here...what where?
    <div class="form1">
    <table width="640" height="239" border="0"
    cellpadding="0" cellspacing="0">
    <tr>
    <td width="320" valign="top"> Name:
    <input type="text" name="t1" size="36" />
    <br />
    Company:
    <input type="text" name="t4" size="36" />
    <br />
    Address:
    <p><span class="Roman9px">
    <textarea rows="4" name="st"
    cols="35"></textarea>
    </span> </p>
    Your message or enquiry details:
    <p><span class="Roman9px">
    <textarea rows="4" name="t5"
    cols="35"></textarea>
    </span></p>
    </td>
    <td width="320" valign="top"><form method="post"
    action="SubmitForm.asp">
    <p></p>
    Phone:
    <p>
    <input type="text" name="t2" size="36" />
    <br />
    Email: </p>
    <p class="bold">
    <input type="text" name="t3" size="36" />
    </p>
    <p>
    <label>How did you here about us?<br />
    <select name="t6" id="t6">
    <option value="None Selected"
    selected="selected">Please Select</option>
    <option value="Internet Search">Internet
    Search</option>
    <option value="Advertising">Advertising</option>
    <option
    value="Recommendation">Recommendation</option>
    </select>
    </label>
    </p>
    <p class="Roman9px"> </p>
    <p class="Roman9px">
    <input type="submit" class="Roman10px" value="Submit"
    />
    </p>
    </form>
    </td>
    </tr>
    </table>
    </div>
    Rich

  • Split one column value into two columns using t-sql

    Hi All,
    I have one varchar column in a table.
    Col1
    ABC-12C4
    BC-A345
    CD
    XYZ
    How to split this into two columns like this using t-sql
    Col1   Col2
    ABC    12C4
    BC      A345
    CD     
    XYZ
    Thanks,
    RH
    sql

    assuming a static delimiter, and the split will end up with a max of 2 columns, something like this would work.  basically you just need to determine where the delimiter is, and then use the left and right functions to find the 2 pieces.
    declare @t table(value varchar(10))
    insert into @t(value)
    values
    ('ABC-12C4'), ('BC-A345'), ('CD'), ('XYZ')
    select
    case
    when charindex('-', value) != 0 then left(value, charindex('-', value) - 1)
    else value
    end as col1,
    case
    when charindex('-', value) != 0 then right(value, len(value) - charindex('-', value))
    else ''
    end as col2
    from @t

  • Text flow into one or two column text boxes depending on the number of text lines

    Question InDesignCS3
    Is it possible to let text flow into one or two column textboxes depending on the number of text lines?
    Example 1)
    --Default text box--|
    | Text line 1 |
    | Text line 2 |
    | Text line 3 |
    | Text line 4 |
    ------------------- |
    If there are more than 4 text lines in the in the text box, this box has to become a two column box. like example 2
    example 2)
    |Text line 1 | Text line 4 |
    |Text line 2 | Text line 5 |
    |Text line 3 | Text line 6 |

    if (myTextFrame.lines > 4) {
    myTextFrame.textFramePreferences.textColumnCount = 2;
    } else {
    myTextFrame.textFramePreferences.textColumnCount = 1;

Maybe you are looking for

  • How can i get my shuffle to show up as a device on itunes

         My ipod shuffle neither shows up in "computer" in windows 7. There is also no indication on the itunes page showing that the device, the shuffle, is installed.      The itunes has been reloaded. Result did not change. Have followed Apple instruc

  • Date Formats in Oracle Applications Forms and Oracle Self Service

    Can someone tell me what determines the Date format that appears on Oracle Applications Forms and Oracle Self Service ? *1.* In Oracle HRMS,all dates i see on the Forms are of the Format "MM/DD/YYYY" but my NLS Parameters are not in this format .I'm

  • Application Development Framework

    Is there an application development framework for HTML5? Not the generic CSS and Javascript version where you build your own app, rather some kinda framework like Flex where everything gets embedded into the Canvas and javascripts gets cretade as you

  • Elements 10 How I open NEF Files

    I Have down loaded up- dates so much so that you will not give me any more. But I still cannot load NEF Files on to Elements 10 Directly. It just take a great deal of time down loading & turning them into TIFF files, is there an alternative without u

  • Syncing music videos

    So after i clicked the "convert selection for iPod" thing it converted and whatnot and is now on my iPod but im nkot getting any sound either on my iPod or on iTunes, how do i fix that or what do i do?