power-sum with condition group

Hello
I'm fighting with these totals.
I can't understand the syntax <? sum (current - group (/AMOUNT))? > condition AMOUNT > 100.
What I want him to have Total of any amounts that are greater than 100 for example. This 100 is supposed to be variable.

I tried some things that have been proposed in the forum, but all raise error.

You can try some thing like that

[100])? >

can you send me your model you use.

E-mail: [email protected]

Tags: Business Intelligence

Similar Questions

  • Calculation of the sum with condition

    Hello
    I start with BI publisher, and I want to take a NAP with condition.

    My report output XLS, I haves columns, named ACCOUNT_TYPE and TREE_NODE and MOENTARY_AMOUNT_03 that are my PS query fields

    I want to sum only when a condition is true.

    <? xdofx:If ACCOUNT_TYPE = 'R' AND TREE_NOD = 'TEST' then
    Sum (MONETARY_AMOUNT_03)
    end if? >

    This does not,
    could you help me?

    thaks!

    You should do this:

  • Sum with condition.

    Hello guys I have a simple query, but it just dosent seem to work. I have a column that I would only add another column is between a range, but I keep getting '0', even if a part of the range has values. can someone please point out what is obvious.

    Thanks in advance
    select nvl(sum(fgbopal_14_ytd_actv),0)  from fgbopal
    where fgbopal_fund_code = '400002' 
    and nvl((fgbopal_acct_code),0) between '7000' and '7019'  
    and nvl((fgbopal_acct_code),0) between '7046' and '7177'
    FYI If part of the range has a value but the other party does not, I always get a '0 '.
    Help!

    Hello

    user633029 wrote:
    Hello guys I have a simple query, but it just dosent seem to work. I have a column that I would only add another column is between a range, but I keep getting '0', even if a part of the range has values. can someone please point out what is obvious.

    Thanks in advance

    select nvl(sum(fgbopal_14_ytd_actv),0)  from fgbopal
    where fgbopal_fund_code = '400002'
    and nvl((fgbopal_acct_code),0) between '7000' and '7019'
    and nvl((fgbopal_acct_code),0) between '7046' and '7177'
    

    FYI If part of the range has a value but the other party does not, I always get a '0 '.
    Help!

    The last two conditions cannot be true at the same time.
    If, on a line, ggbopal_acct_code is between '7000', and '7019', then it will not be between ' 7046 'and ' 7177'.
    If it's between '7046' and '7177', then it will not be between ' 7000 'and ' 7019'.

    Maybe you wanted to say:

    select  nvl(sum(fgbopal_14_ytd_actv),0)  from fgbopal
    where   fgbopal_fund_code = '400002'
    and     (   fgbopal_acct_code between '7000' and '7019'
            or  fgbopal_acct_code between '7046' and '7177'
            )
    

    The following has nothing to do with your problem, but I got rid of the NVL in the WHERE clause, because NVL (x, '0') will be between "7000' and '7019' (or '7046' and '7177') if and only if x itself is between '7000' and '7019' or between ' 7046 '(and ' 7177')."
    If x is a VARCHAR2 (or other string) and you use NVL (for example, WHERE NVL (x, '0') BETWEEN ' 0 'and ' 2999') then don't forget to quote the '0'. The two arguments of NVL should both be of the same type, strings or two numbers.

    Published by: Frank Kulash, July 12, 2009 12:32

    I just saw Michaels response.
    Both

    nvl (sum (fgbopal_14_ytd_actv), 0)
    

    and

    sum (nvl (fgbopal_14_ytd_actv, 0))
    

    will produce the same results. The first way will be a little more efficient, because NVL will not need to be called once.

    Published by: Frank Kulash, July 12, 2009 12:54

  • Power CLI script to add multiple VLANs with port group name in an ESX cluster

    Hi all

    Can someone help me get a script adds several VLANs with port group name in an ESX cluster?

    Kind regards

    Suresh

    OK, so you just need to do an Import-Csv inside the loop and change the variables accordingly.

    What is the provision of this CSV file?

  • SQL with conditions

    Hello

    I need to generate a summary table with conditions. Here are the details:

    create the table tb_class (classId number (5), studentNum number (5));

    create table tb_grade (classId number (5), gradeNum number (5)):

    insert into table values tb_class (101, 100);

    insert into table values (201, 102) tb_class;

    insert into table values (102, 103) tb_class;

    insert into table values tb_grade (101, 1);

    insert into table values (102, 1) tb_grade;

    insert into table values (201, 2) tb_gradfe;

    I would like to get the total number of students registed in a specific shade with a SQL, the result is expected as follows:

    GradeNum studentNumRegistered studentNumNonRegisted

    1                         203                                      102

    2                         102                                      203

    Is that what you are looking for?

    WITH subsum AS
     (SELECT tb_grade.gradenum,
             SUM(tb_class.studentnum) AS students
      FROM   tb_class
      JOIN   tb_grade ON tb_grade.classid = tb_class.classid
      GROUP  BY tb_grade.gradenum)
    SELECT subsum.gradenum,
           SUM(subsum.students) AS studentnumregistered,
           SUM(subsum1.students) AS studentnumnonregistered
    FROM subsum
    JOIN subsum subsum1 ON subsum1.gradenum != subsum.gradenum
    GROUP  BY subsum.gradenum;
    
  • Conditional group

    Hello
    I need to make a conditional group based on the values of column grouped without the help of the trade unions. Is it possible to do in a single query...
    I need e exit suite
    with the trial as
    (
    Select 1 as col1, 10 as double amt
    Union
    Select 2 as col1, 11 as double amt
    Union
    Select 1 as col1, 12 as double amt
    Union
    Select 2 as col1, 13 as double amt
    Union
    Select 1 as col1, 14 as double amt
    )
    Select col1, sum (amt) test col2
    where col1 = 1
    Group of col1
    Union of all the
    Select col1, col2 amt test
    where col1 <>1

    Thanks in advance

    Hello

    Try something like:

    SQL> with test as
      2  (
      3  select 1 as col1 , 10 as amt from dual
      4  union
      5  select 2 as col1 , 11 as amt from dual
      6  union
      7  select 1 as col1 , 12 as amt from dual
      8  union
      9  select 2 as col1 , 13 as amt from dual
     10  union
     11  select 1 as col1 , 14 as amt from dual
     12  )
     13  select distinct
     14         col1
     15  ,      case when col1 = 1 then sum(amt) over (partition by col1) else amt  end col2
     16  from   test;
    
          COL1  COL2
    ---------- -----
             1    36
             2    11
             2    13
    
    3 rows selected.
    
  • join with condition

    Hi all

    Is there a possible way to cross the join with condition?

    I want something like this:

    Table A: custid, accu_id, sum

    CustID, accu_id unique =

    CustomerID amount accu_id

    10 25 400

    10 35 447

    10 29 420

    20 30 510

    30 35 472

    .

    .

    .

    Table b: accu_id, description

    accu_id description

    shoes 25

    Book 29

    30 computer

    pen 35

    Note: in table A, it is a mismatch of the accu_id values that do not use. Please, take into account this.

    I want to see all the columns in the TABLE B for each custid in A. TABLE (something like cross join but with ONE article.) The following query does not work.

    Select * from a right join B on A.accu_id = B.accu_id;

    10-25

    10-29

    10-30

    10-35

    20-25

    20-29

    20-30

    20-35

    30 25

    30 29

    30 30

    30-35

    What should I do for this?

    Thanks in advance

    Use partition outer join:

    with a (too)

    Select double union all 10 custid, accu_id 25, amount 400

    Select 10,35,447 from all the double union

    Select 10,29,420 from all the double union

    Select 20,30,510 from all the double union

    Select double 30,35,472

    ),

    b like)

    Select accu_id 25, "shoe" description of all the double union

    Select 29, 'book' from dual union all

    Select 30, 'computer' from dual union all

    Select 35, 'pen' from dual

    )

    Select a.custid,

    a.accu_id,

    a.amount,

    b.

    a

    by (a.custid) partition

    right join

    b

    On a.accu_id = b.accu_id

    order of a.custid,

    a.accu_id

    /

    AMOUNT ACCU_ID CUSTID DESCRIPT
    ---------- ---------- ---------- --------
    10 25 400 shoe
    10 29 420 book
    10 35 447 pen
    10 computer
    20 30 510 computer
    shoe 20
    book 20
    20                       pen
    30 35 472 pen
    30 shoe
    30 book

    AMOUNT ACCU_ID CUSTID DESCRIPT
    ---------- ---------- ---------- --------
    30 computer

    12 selected lines.

    SQL >

    SY.

  • How to avoid duplicates on a column with condition

    Hi all

    I need some advice here. At work, we have an Oracle APEX application that allow the user to add new records with the decision of the increment automatic number based on the year and the group name.

    Said that if they add the first record, group name AA, for 2012, they get the decision number AA 1 2013 as their record casein displayed page of the report.

    The second record of AA in 2013 will be AA 2 2013.

    If we add about 20 records, it will be AA 20 2013.

    The first record for 2014 will be AA 1 2014.

    However, recently, we get a claim of the user on two files of the same name of group have the same number of the decision.

    When I looked in the history table and find that the time gap between 2 record is about 0.1 seconds.

    In addition, we have the correspondence table which allows the user admin update the sequence number start with the restraint that it must be greater than the maximum number of the current name of the current year.

    This boot sequence number and the name of the group is stored together in a table.

    And in some other case, the user can add a decision duplicate for related record number. (this is a new feature)

    The current logic of the procedure to add the new record on the application are

    _Get max record table with selected group name (decision_number) and the current year.

    _INSERT in the folder table the new record came with the decision to number + 1

    _ update sequence number of the number of the decision just added.

    So instead of utitlising the process of editing the built-in automatic table of the APEX, I write a procedure that combine all three processes.

    I have run some loop for continually perform this procedure, and it seems that it can generate autotically new decision unique number with time about 0.1 second difference.

    However, when I increase the number of entry to 200 and let two users run 100 each.

    If the time gap is about 0.01 second, double decision numbers are displayed.

    What can I do to prevent duplicate?

    I can't just apply a unique constraint here for three columns with condition because it can be duplicated in some special conditions. I don't know much about the use of lock and its impact.

    This is the content of my procedure

    create or replace

    PROCEDURE add_new_case)

    -ID just use the trigger

    p_case_title IN varchar2,

    p_year IN varchar2,

    p_group_name IN VARCHAR2,

    -decisionnumber here

    p_case_file_number IN VARCHAR2,

    -active

    p_user in VARCHAR2

    )

    AS

    NUMBER default_value;

    caseCount NUMBER;

    seqNumber NUMBER;

    previousDecisionNumber NUMBER;

    BEGIN

    -execution immediate q '[alter session set nls_date_format = "dd/mm/yyyy"]';

    SELECT count (*)

    IN caseCount

    OF CASE_RECORD

    WHERE GROUP_ABBR = p_group_name

    AND to_number (to_char (create_date, "yyyy")) = to_number (to_char (date_utils.get_current_date, "yyyy"));

    SELECT max (decision_number)

    IN previousDecisionNumber

    OF CASE_RECORD

    WHERE GROUP_ABBR = p_group_name

    AND to_number (to_char (create_date, "yyyy")) = to_number (to_char (date_utils.get_current_date, "yyyy"));

    IF p_group_name IS NULL

    THEN seqNumber: = 0;

    ON THE OTHER

    SELECT Seq_number INTO seqNumber FROM GROUP_LOOKUP WHERE ABBREVIATION = p_group_name;

    END IF;

    IF caseCount > 0 THEN

    default_value: largest = (seqNumber, previousdecisionnumber) + 1;

    ON THE OTHER

    default_value: = 1;

    END IF;

    INSERT INTO CASE_RECORD (case_title, decision_year, GROUP_ABBR, decision_number, case_file_number, active_yn, created_by, create_date)

    VALUES (p_case_title, p_year, p_group_name, default_value, p_case_file_number, 'Y', p_user, sysdate);

    -Need to update the sequence here also

    UPDATE GROUP_LOOKUP

    SET SEQ_NUMBER = default_value

    WHERE the ABBREVIATION = p_group_name;

    COMMIT;

    EXCEPTION

    WHILE OTHERS THEN

    Logger.Error (p_message_text = > SQLERRM)

    , p_message_code = > SQLCODE

    , p_stack_trace = > dbms_utility.format_error_backtrace

    );

    LIFT;

    END;

    Many thanks in advance,

    Ann

    It's easier to solve for the case, while p_group_name is not null. In this case, you update a GROUP_LOOKUP line, so that you can select to update this line at the beginning, to prevent cases of two for the same group added at the same time. To do this, change the selection of GROUP_LOOKUP to:

    SELECT Seq_number INTO seqNumber FROM GROUP_LOOKUP WHERE ABBREVIATION = p_group_name for an updated VERSION OF the SEQ_NUMBER;

    and move this to be the first thing that did the procedure - before it has CASE_RECORD lines.

    In the case when p_group_name is set to null, you have some object to be locked. I think the best you can do is to lock the entire table GROUP_LOOKUP:

    the table lock in exclusive mode GROUP_LOOKUP wait 100;

    The '100 expectation' means that he will wait until 100 seconds before giving up and trigger an error. in practice, that is expected to only wait a moment.

    Exclusive mode allows others to read, but not to update the table.

    UPDATES and the LOCK of the TABLE will be updates of other sessions wait for this transaction to validate. Queries from other sessions are not affected.

    The locks are released when you commit or roll back.

  • I have a p6210f (Win 7), that does not illuminate. As recommended, I tried a new power supply with the same results.

    In my post in November, I explained that I had tested the power supply with a multimeter and read the correct voltage. Two people to the Board of Directors always seem to think it was the power supply, so I replaced it with a new one (Corsair CX 430 R) and it still won't turn. I had suspected the power switch because when I bypass the MOBO 20 pin plug 'on', the power led lights up, fans have come on short and I heard the rotation of the disk. I also tried to troubleshoot the switch by jumpering the pins on the motherboard, but still no luck. Someone there ideas more before I replace the card MOTHER and CPU? Thanks in advance.

    Roamstead

    Cloud_strider,

    Thanks for the reply. After swapping the PSU, CPU, taking the RAM pins on jumping on the MOBO for power/LED/reset button, each separately and with the same result, I eventually swapped the MOBO to an ASRock A785GM - THE and who did! He finally put under tension. Thanks again.

    roamstead

  • Can power supply Question - I use the 230W power supply with a W540?

    I have a W540, which currently uses a power 170W (8.5 a 20V)

    I got also a docking station for a P50 that has a power of 230W showing 20V 11. 5a.

    The connectors are similar, but I'm hesitant to try the 230W power supply in the W540.

    It is allowed to use the 230W power supply with the W540?

    230 watts is maximum power feeding, it only provides the energy required by the computer.

    I sold my W540, so I can't test it for you. But I do use the ThinkPad X 1 carbon with 230 watts without no problem power adapter.

  • OfficeJet 8600 more: power cord with adapter for Officejet 8600 set more lost

    Lost my power cord complete with adapter. Can I use a power cord generic Office Depot, without the 'square' on the wire? Or is it necessary to have the power cord with the adapter, as it was originally? It will damage my 8600 more to use a power cord without this "square" in the annex on my more than 8600 all-in-One? Thank you.

    Hello @DB2,

    I understand that you have lost the power cord for your HP Officejet Pro 8600 more e-all-in-one printer and you want to replace it. I would like to help you to solve this problem today. The HP Officejet 8600 more only comes with a power cord. The adapter is built into the back of your printer. You have to unscrew the back of your machine in order to access it. Therefore, if you buy a spare power cord it should work perfectly for you.

    The power requirements for this machine are:

    • Power: Universal power adapter (external)
    • Power consumption: Input voltage: 100 to 240 VAC (± 10%), 50/60 Hz (± 3 Hz)

    Output voltage: + 32V / + 12V to 1095 mA/170 my

    • Consumption: 30 watt impression (project Quick Mode); 32 watts copy (Fast draft Mode)

    -Source

    You can buy a power cable of the store to use with your printer, or you can contact our Technical Support queue and buy the correct power cord for your printer by phone.

    HP Technical Support can be reached at the: 800-474-6836.

    If you do not live in the United States / Canada region, please click the link below to get help from your region number.

    Worldwide contact HP

    Please let me know if this information solves your problem. Thanks for joining the Forums from HP Support. I look forward to hear from you!

  • How to associate policies crypto with tunnel-group?

    Hi, when I review the configuration of the VPN from point to point, I have a question. The ASA has three peer-to-peer VPN configuration. So, there are also three groups of tunnel in there. My question is how each VPN to ensure encryption policy tunnel-group? In the anther Word, what encryption policy associated with tunnel-group? Thank you.

    This is the phase 1, they work from top to bottom.  When you try to negotiate the tunnel between two counterparts, in the background, they send all of your policies and according to which is first (from top to bottom) is used.

    For example.

    If your counterpart device uses (3des, md5, pre-shared key and group 2), it will not match the policy 1 and the rest of the policy will not be considered.

    Kind regards

    Sandra

  • ACS 5.2 assignment of authorization with nested groups in LDAP

    I have a Cisco Secure ACS 5.2 on a virtual machine. We use it for administrative access to our equipment Cisco GANYMEDE +. I use LDAP to authenticate with acitive directory. I currently run when a user is directly in the group that is assigned.  I change the way in which assign us group permissions and have created nested groups.

    For example:

    -User1 is a member of group1

    g -roup1 is a member of the "Group 2".

    I have card group2 to have access to my devices. However, User1 is not get mapped to the Group of law and access is denied.

    When I go to the monitoring, reporting and authentication GANYMEDE + details, under other attributes where it shows the outside groups the user is a member, I don't see group2, only group1.

    However when User1 is a member of group2 directly, the user is able to log on.

    GBA 5.2 not does support permissions allow this how to use nested groups?

    Mapping of nested groups is not supported by LDAP (because users containing that attribute memberOf groups just above them, are not nested). It is a behavior deafult when we use nested with LDAP groups. You must add subgroups for GBA and both respective authorization rules.

    Kind regards

    Jousset

    The rate of useful messages-

  • Transform a shape layer with several groups/paths in another?

    Hello

    I'm trying to turn the form A B-shaped into aftereffects.

    shapes copy.jpg

    Both are drawn in illustrator, and I imported into aftereffects and diverted path to forms.

    At the moment I do a key framing color and the path in the sticky on the form A and form B. From there I will meet with two questions.

    (1) for now I have to manually open each group, every path, every feature of color until I'm able to keyframe them. After that I have to paste the keyframe of the track and keyframe colors individually to the corresponding group. It's doable, but I have to turn the form in 10 more other variants. Just want to check is there a shorter way to the key all the way to access and color properties frame. And then copy all of the keyframes from one form to the other.

    Screen Shot 2016-04-21 at 2.33.34 PM.png

    (2) I noticed that not all the points on the path are created equal. I think that the "starting point" is noted with an extra box compared to other points.

    Screen Shot 2016-04-21 at 2.47.02 PM.pngScreen Shot 2016-04-21 at 2.47.14 PM.png

    As the "starting point" of a path is different from the rest, the transition has become weirdshape.gif.
    Can I check if someone knows how to change the "starting point" to another point on the same path? Or y at - it another way of fixing?

    Finally, if there is more easy morphing shapes to another, I'll be happy to listen. Thanks a lot ~

    I would do this kind of thing differently and 90% of the work in Illustrator.

    I would like to begin by drawing a path in Illustrator, to duplicate the path and to change the size and position and change the color of the outline of the color I wanted for the inside of the first form at the beginning of the animation.

    I use then the gradient tool to create a blend between the two forms specifying the number of steps, so my first form duly filled out for one frame looked like this:

    I would then do the same for my second form by using different colors, so I got this:

    With the two mixtures on you will see this:

    The upper mixing layer is where your animation will start and the bottom is where your animation should end.

    The next step is to select Merge layers and spread the mixture, if you find yourself with two groups:

    Here comes the fun part. Select groups, and then specify the number of steps you want as long as the number of images that you want in your animation. In this case, I want a second 1 transition and my comp is 29.97 FPS, so I selected 30.

    Now spread the mixture:

    We should end up with a group at layer 1 with 30 subgroups:

    Ungroup the higher group only then deselect all layers and select a single layer, then choose release to layers (sequence).

    now select all sub layers in the layer panel and drag it above layer 1. Layer 1 is now empty, so you can delete:

    Save the file HAVE and import into AE as a model with the size of the layer keeps selected:

    [Open the model, select all layers, move the a CTI frame to the right by pressing Ctrl/Cmnd + arrow to the right, then press Alt/Option +] to set the out point of all layers and then the wizard from keyframe to the layers in sequence without overlapping:

    I usually go to the point of exit of the background layer and press N to set the work area exit point, then cut the comp to work area.

    This model is then nested in your main comp and you can activate the time-remapping, so you can change the speed and use CC force motion blur to smooth animation.

    You will find it much easier to create the morph to a shape layer in Illustrator those in AE, you don't need to convert anything to forms and most of the work is done for you before you start. Total time to create this project with about 1/4 of the time it took to create this post.

  • Where to write the condition in the design of workflows with conditional step?


    Hello

    Again, I wish BP and workflow with contitional design stage.

    I had designed BP and workflow.

    As directed by the user for Udesigner guide, I had added trigger before the condition step.

    But I do not understand where to set the Condition to test?

    If I need to write the condition in triggering elemt itsel... How to proceed?

    for example, I want to write the condition as cost of Tota > = 100000, it must follow a path and if fails to another path.

    The conditions of triggers are specified in the workflow settings.  After you have created a new configuration, open it and click on the settings tab.  You will see a tree structure of the workflow with conditional branches.  Click a conditional branch to set the parameters for the trigger for this route condition.

Maybe you are looking for

  • Connected to the Portege 3500 USB DVD burner is not recognized correctly

    I am trying to connect a burner DVD HP DVDv 940th my 3500.When Portege I plug in the device, it is not recognized and the Device Manager list as a storage of unknown mass without a driver. Where can I get this driver?

  • My laptop can not find IP address

    My laptop (XP) worked in harness wi - fi with my PC (W7) years.  Suddenly, he is unable to find the IP address, even though it recognizes the network and has a strong signal.  Windows repair cannot sort.  I turning the router off & save and verified

  • "Aero Peek" selects windows on top, but after a second selected window is coming back, behind other windows. __

    When I use Aero Peek and select 1 window to bring it over the top, he goes there, but after a second, he goes back and hides. Sometimes it is on top a little longer, sometimes it's on the top of page continuous, but especially it goes back bihind oth

  • All pages are smaller

    After virus scan and restart all data, computers desktop, and the pages are smaller. He can not find how to enlarge all at the same time.

  • Windows 7 Bluetooth audio problems

    I bought a Sony SRS - XB2 Bluetooth speaker in the USA. I'm trying to use it to listen to music from my computer laptop runing windows 7. The speker is recognized but you are asked to install the drivers and when I access Sony supports, they say, tha