Complex conditional sum formatting

I am working on a document that breaks down backpacking supplies per camper.  I have a formula that allows me to add pounds and ounces, however I want to add a conditional sum so that under total weight I can have Camper 1, 2 and 3’s total weight.  Because of the formula adding lbs and oz I can’t get the conditional sum formula to work. 
Formula for adding lbs and oz: =INT((SUM(C2:C30)*16+SUM(D2:D30))/16)&" lbs. "&MOD((SUM(C2:C30)*16+SUM(D2:D30))/16,1)*16&" oz."
Sample:

Do all the calculations using a single unit. Ounces.
Add a column after column D to convert each pair of numbers into ounces only.
E2: =16*C+D
Fill down to E9
Place the weight summaries onto a separate table. This allows you to reference whole columns without running into "own cell" errors.
If desired, convert the totals back to pounds and ounces using Quotient and MOD.
Formulas on the summary table:
B2: =QUOTIENT(SUM(Table 1 :: $E),16)&" lb. "&MOD(SUM(Table 1 :: $E),16)&" oz. "
B3, filled down to B4: =QUOTIENT(SUMIF(Table 1 :: $F,A3,Table 1 :: $E),16)&" lb. "&MOD(SUMIF(Table 1 :: F,A3,Table 1 :: $E),16)&" oz. "
Regards,
Barry

Similar Messages

  • How to code complex conditions

    Hi Everyone,
    First, please forgive if I don't use programming terminology correctly, I am a beginner with no background in informatics.
    My question will be a general one: What is the good approach to code complicated conditions?
    I have a good example to start with which is actually a concrete task that I need to do in my small application:
    TODO: Shorten/abbreviate a person's full name to fit in to a 16 characters.
    For example: Johnathan Necromancer --> J Necromancer
    There are many possibilities how to do it based on the length of the first, last and middle names and there is an order of preference for these solutions.
    So if possible abbreviate only the first name like above; if it's still too long then then leave the space out, and so on. These would be the preferences demonstrated with examples:
    1. J L Smith
    2. JL Smith
    3. JLSmith
    4. John Languely S
    5. John Lang B S
    6. John L S
    7. JohnLS
    8. J L S
    9. JLS
    How to code it? With nested if -s or with if-else blocks or in an other way?
    First I did it with nested if -s, but it was kind of mess after a while, so the most straightforward way for me was to do it as follows:
    (Simply 'calculate' the abbreviated names in the preferred order and return if it fits into the 16 characters.)
    if (displayName.length() > 16) {
                   String[] dn = displayName.split("\\s+");
                   String lName = dn[dn.length - 1];
                   StringBuffer dName16 = new StringBuffer();
                   // J L Smith
                   dName16 = new StringBuffer();
                   for (int i = 0; i < dn.length - 1; i++) {
                        dName16.append(dn.charAt(0) + " ");
                   dName16.append(lName);
                   if (dName16.length() <= 16){
                        return new String(dName16);
                   // JL Smith
                   dName16 = new StringBuffer();
                   for (int i = 0; i < dn.length - 1; i++) {
                        dName16.append(dn[i].charAt(0));
                   dName16.append(" " + lName);
                   if (dName16.length() <= 16){
                        return new String(dName16);
                   // JLSmith
                   dName16 = new StringBuffer();
                   for (int i = 0; i < dn.length - 1; i++) {
                        dName16.append(dn[i].charAt(0));
                   dName16.append(lName);
                   if (dName16.length() <= 16){
                        return new String(dName16);
    //more code..
    I would like to know how to approach these kind of situations effectively and clearly in the least error prone way. How to code complex conditions? Is there any book or theory about it?
    I am not sure it is clear what I am asking, but I will follow up with more description on what I mean later. But please comment, ask, advice anything in the meantime - I would really appreciate any help with this.
    Thank you in advance!
    lemonboston                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    So this would be it. What do you think, what should I improve?
    public class Main {
         public static void main(String[] args) {
              String[] names = { "Bud Spencer", "Matthew MacFadyen",
                        "Juan Carlos Santiago Sanchez Estrella Ramirez",
              "Maria De Dios Otero" };
              for (String n : names) {
                   System.out.println(n + " -->\n" + abbreviateName(n, 16) + "\n");
         private static String abbreviateName(String fullName, int maxLength) {
              if (fullName.length() <= maxLength) {
                   return fullName;
              } else {
               * preferred formats for abbreviation:
               * J L Smith
               * JL Smith
               * JLSmith
               * John Languely S
               * John L S
               * JohnLS
               * J L S
               * JLS
               * if none works, return the first maxLength characters
                   String[] nameArr = fullName.split("\\s+");
                   String lastName = nameArr[nameArr.length - 1];
                   ArrayList<StringBuffer> abbreviatedList = new ArrayList<StringBuffer>();
                   StringBuffer abbreviatedName;
                   // J L Smith
                   abbreviatedName = new StringBuffer();
                   for (int i = 0; i < nameArr.length - 1; i++) {
                        abbreviatedName.append(nameArr.charAt(0) + " ");
                   abbreviatedName.append(lastName);
                   abbreviatedList.add(abbreviatedName);
                   // JL Smith
                   abbreviatedName = new StringBuffer();
                   for (int i = 0; i < nameArr.length - 1; i++) {
                        abbreviatedName.append(nameArr[i].charAt(0));
                   abbreviatedName.append(" " + lastName);
                   abbreviatedList.add(abbreviatedName);
                   // JLSmith
                   abbreviatedName = new StringBuffer();
                   for (int i = 0; i < nameArr.length - 1; i++) {
                        abbreviatedName.append(nameArr[i].charAt(0));
                   abbreviatedName.append(lastName);
                   abbreviatedList.add(abbreviatedName);
                   // John Languely S
                   abbreviatedName = new StringBuffer();
                   for (int i = 0; i < nameArr.length - 1; i++) {
                        abbreviatedName.append(nameArr[i] + " ");
                   abbreviatedName.append(lastName.charAt(0));
                   abbreviatedList.add(abbreviatedName);
                   // John L S
                   abbreviatedName = new StringBuffer();
                   abbreviatedName.append(nameArr[0] + " ");
                   abbreviatedName.append(lastName.charAt(0));
                   abbreviatedList.add(abbreviatedName);
                   // JohnLS
                   abbreviatedName = new StringBuffer();
                   abbreviatedName.append(nameArr[0]);
                   for (int i = 1; i < nameArr.length - 1; i++) {
                        abbreviatedName.append(nameArr[i].charAt(0));
                   abbreviatedList.add(abbreviatedName);
                   // J L S
                   abbreviatedName = new StringBuffer();
                   for (int i = 1; i < nameArr.length - 2; i++) {
                        abbreviatedName.append(nameArr[i].charAt(0) + " ");
                   abbreviatedName.append(lastName.charAt(0));
                   abbreviatedList.add(abbreviatedName);
                   // JLS
                   abbreviatedName = new StringBuffer();
                   for (int i = 1; i < nameArr.length - 1; i++) {
                        abbreviatedName.append(nameArr[i].charAt(0));
                   abbreviatedList.add(abbreviatedName);
                   // return the first one that fits in to maxLength
                   for (StringBuffer shortName : abbreviatedList) {
                        if (shortName.length() <= maxLength) {
                             return new String(shortName);
                   // If none of the above works, simply keep the first maxLenght character               
                   return fullName.substring(0, maxLength - 1);

  • Complex condition in process flow transition

    From a mapping i have three outgoing transitions:
    1: "KM_UTIL_PKG"."GETTESTMODE"() = 0
    2: "KM_UTIL_PKG"."GETTESTMODE"() = 1
    3: unconditional
    the process flow validates ok, deploys ok but when it is executed the error message is :
    ORA-06550: line 1, column 1085: PLS-00201: identifier 'KM_UTIL_PKG.GETTESTMODE' must be declared ORA-06550: line 1, column 1058: PL/SQL: Statement ignored.
    Although the function is there.
    What am i doing wrong ?. Has anyone an example of the expected syntax in the transition condition editor > complex condition window ?
    Ron

    Try giving just = 0 and = 1 without the function call, as the function call is already appended in the where clause.
    For example I was able to make it work by just giving IS NULL and IS NOT NULL.
    Also there is VALIDATE button within the window where we give the complex condition. Try to validate the condition there itself.
    Best,
    Manohar

  • Complex conditional mappings - XSLT constructs

    Hi,
    Please confirm if following such complex conditional mappings are possible using
    BPEL Jdev and how can these be achieved
    I could not find anything in XSLT constructs of BPEL or either tutorials which
    would help me in ascertaining if the following types are possible in BPEL.
    the items that fall before "_" below are the elements
    suffixes source and target indicates that elements are of target or source
    xsd
    constants are indicated by _constant
    if (x_source=c1_constant or x_source=c2_constant)
    then
    b_target=(b_source "concatenated with" d_source)
    else b_target=b_source
    if (a_source>a1_constant)
    and
    if (x_source!=c1_constant or x_source!=c2_constant)
    then
    a_target=a_source
    We are planning to Use BPEL/B2B for EDI. Our current EDI systems have such kind
    of complex mappings requirements where those are resolved by EDI tool, wanted
    to check if same is possible in BPEL and how can this be achieved
    Thanks
    Sachin Sutar

    Of course, use an XSL to transform from source XSD to destination XSD.
    Check out http://www.w3.org/TR/xslt to see conditional processing in XSLT. You may either use xsl:if and xsl:choose for conditional processing in XSL.

  • Complex condition in OWB

    Hi ,
    I have designed the process flow where i have a plsql transformation which is further connected to route activity, route has to take decision if the plsql transformation value is 'yes' then run the mapping else route the other flow which will run the status procedure to log the message of the end of activity.
    procedure------route----1 to end the activity and log 2, run the mapping based ok plsql return value.
    I tried to use complex condition but it says the return value should be declare.
    how can i use the retun value in complex condition

    If you configure the process flow and go to Transformation Activities and your PLSQL transformation, keep expanding under Execution Settings there is a property 'Use return as Status', by default this is false, change to true and you can use a PLSQL function return value as a value to test in expressions.
    Cheers
    David

  • [OWB 10g] Complex Condition in a transition

    Hi all,
    I want to do a complex condition from my "AND1" component to my "END_SUCCESS".
    Here is a picture of my problem :
    [http://craweb.free.fr/owb/flux.png]
    In fact, I want to do this condition (you can see it in the previous picture) :
    IF after the "AND1" component the number of warnings <= 50 THEN
    redirect to "END_SUCCESS" (equivalent to "SUCCESS" enumerated condition)
    ELSIF after the "AND1" component it's "SUCCESS" THEN
    refirect to "END_SUCCESS"
    ELSE
    redirect to "END_WARNING"
    END IF;
    I have a problem with "NUMBER_OF_WARNINGS" variable and I don't know how to write my complex condition.
    Please, is anyone can help ?
    Regards,
    VD.
    Edited by: user7960834 on 24 juin 2009 00:36

    I have found the solution by creating a function.
    Thanks for help anyway.

  • Set complex condition of process flow transition by OMB skript

    Hi,
    i would like to set a complex condition for a process flow transition with OMB+.
    If i use:
    OMBALTER PROCESS_FLOW 'somename' ADD TRANSITION 'yyy' FROM ACTIVITY 'a' to 'b' SET PROPERTIES (TRANSITION_CONDITION) VALUES ('some complex condition')
    the skript sets the condition but the radiobutton within the transition condition editor still point to 'Enumerated Condition' and the complex condition editor sheet, where my condition should be printed is empty. But the Object details within the Process editor shows my condition correct.
    We use 11gR1 11.1.0.7.0 (OWB & DB).
    Has anybody a clue if i am able to set the transitioncondition to COMPLEX ? Or is it a bug ?
    Your Help is appreciated, thanks
    Thomas

    Hi Thomas
    You use the property COMPLEX_CONDITION on the activity for complex transition condition expressions.
    Cheers
    David

  • Conditional Column Formatting in an Interactive Report?

    Is it possible to add conditional column formatting in an Interactive Report in Apex 4.1? I've found numerous examples for older versions using the standard (classic) report, but I haven't found any with the new Interactive Report. Is this possible? and if so, can someone point me in the direction of some documentation or examples?
    I simply want to change the color of the text depending on whether a column has a value (eg. Error or Problem).
    Thanks

    JB wrote:
    Is it possible to add conditional column formatting in an Interactive Report in Apex 4.1? I've found numerous examples for older versions using the standard (classic) report, but I haven't found any with the new Interactive Report. Is this possible? and if so, can someone point me in the direction of some documentation or examples?
    Oracle Application Express (APEX)
    As interactive reports lack the HTML Expression feature of standard reports, the simple way to do this unfortunately requires violating the separation of concerns and generating structural (a <tt>span</tt> element) and presentational (an in-line style sheet) aspects in the query:
    select
    ⋮        
           , case
               when trunc(calling_date,'DD') =  trunc(sysdate,'DD')
               then
                 '<!-- ' || to_char(calling_date, 'YYYYMMDD') || ' --><span style="color: #3399FF;">' || to_char(calling_date) || '</span>'
               else
                 '<!-- ' || to_char(calling_date, 'YYYYMMDD') || ' --><span>' || to_char(calling_date) || '</span>'
             end calling_date
    ⋮For number/date columns to be properly sortable, the leading edge of the column must be an HTML comment that provides the required sort order using character semantics, as shown here.
    The Display As column attribute for such columns must be set to Standard Report Column.
    This method has side effects: some IR filters won't work; aggregate calculations can't be applied to the column; and report exports contain the HTML rather than the expected value.
    Other approaches involve using Dynamic Actions/jQuery/JavaScript, or using the built-in highlight as suggested above, then saving the highlighted report as the default.

  • How deploy a transition using complex condition by OMB+?

    Hello,
    I can’t deploy a process flow package using OMB+
    But, it doesn't work because of a transition with complex condition.
    I will try to explain my problem on the best :
    I am working in OWB 10g R2.
    I developped several process flow of this modele:
    - I have a package module named : PFL_MODULE
    - In this package module, I have created four process flow package :
    PPK_ODS
    PPK_DWH
    PPK_DMT
    PPK_SCH
    In each package I have three or four process flow.
    To deploy it, I use OMB+
    I created this script :
    +# move to apropriate context+
    OMBCC '/$project_name/PFL_MODULE'
    +puts "Current context is [OMBDCC]"+
    +puts ""+
    +# Connect to the default control center+
    +puts "Connect to the default control center"+
    +puts ""+
    +OMBCONNECT CONTROL_CENTER+
    +puts "Deploying workflows :"+
    OMBCREATE TRANSIENT DEPLOYMENT_ACTION_PLAN 'PROCESS_FLOW_PACKAGES' \
    ADD ACTION 'PPK_ODS' \
    SET PROPERTIES (OPERATION) VALUES ('CREATE') \
    SET REFERENCE PROCESS_FLOW_PACKAGE 'PPK_ODS' \
    ADD ACTION 'PPK_DWH' \
    SET PROPERTIES (OPERATION) VALUES ('CREATE') \
    SET REFERENCE PROCESS_FLOW_PACKAGE 'PPK_DWH' \
    ADD ACTION 'PPK_DMT' \
    SET PROPERTIES (OPERATION) VALUES ('CREATE') \
    SET REFERENCE PROCESS_FLOW_PACKAGE 'PPK_DMT' \
    ADD ACTION 'PPK_SCH' \
    SET PROPERTIES (OPERATION) VALUES ('CREATE') \
    SET REFERENCE PROCESS_FLOW_PACKAGE 'PPK_SCH' \
    OMBDEPLOY DEPLOYMENT_ACTION_PLAN 'PROCESS_FLOW_PACKAGES'
    OMBDROP DEPLOYMENT_ACTION_PLAN 'PROCESS_FLOW_PACKAGES'
    +puts [OMBCOMMIT]+
    +puts "Workflows are deployed"+
    when I tested it, everything worked !
    But, recently, I had to modify one of my process flow. This process flow is in PPK_SCH package (and it named PRC_SCH_FULL)
    I had to change a transition using an enumerated condition (SUCCESS, ERROR) by a transition using a complex condition.
    My condition is very simple, I test one of my variable ("PRC_SCH_FULL"."VAR_END" =1)
    When I deploy my new process flow by the control center in OWB it works.
    But, when I deploy it by my script I have an error message :
    *OMB05602 : An unknown Deployment error has occured for Object Type DeploymentContextImpl.generate WBGeneratedObject[] is null or length 0 for PPK_SCH.*
    I'm sure the problem is in transition because when I put an enumerted condition back, it works again.
    So, How can I do to deploy my process flow package that contains a process flow with complex condition in a transition?
    thank you in advance for any suggestions.
    Jue.
    Edited by: Jue on 20 juil. 2011 05:06

    If I get what you said, then you have 2 enumerated and one complex condition?
    Rules for Valid Transitions
    For a transition to be valid, it must conform to the following rules:
    All activities, apart from START and END, must have at least one incoming transition.
    Only the AND and OR activities can have more than one incoming transition.
    Only a FORK activity can have more than one unconditional outgoing transition.
    A FORK activity can have only unconditional outgoing transitions.
    An activity that has an enumerated set of outcomes must have either an outgoing transition for each possible outcome or an unconditional outgoing transition.
    An activity can have zero or more outgoing complex expression transitions.
    An activity, with an outgoing complex expression transition, must have an unconditional outgoing transition.
    An END_LOOP transition must have only one unconditional transition to its associated FOR_LOOP or WHILE_LOOP activity.
    The transition taken by the exit outcome of a FOR_LOOP or WHILE_LOOP must not connect to an activity that could be carried on as a result of the "loop."

  • Conditional Row formatting not working in RTF

    Hi Everyone,
    Using the code from the documentation, I have managed to get every other row in my report to highlight, but only when displayed in a PDF. It doesn't come out with any row formatting when viewed as an RTF.
    Can anyone explain why this is, or how I can get the RTF to how the formatting as well??
    The code I am using is from page 6-90 from the documentation, in the "for-each ROW" text field formatting options:
    <?if@row:position() mod 2=0?><xsl:attribute name=”background-color” xdofo:ctx="incontext">#D9D9D9</xsl:attribute><?end if?>

    Ok, thank you for your reply.
    I think it is a bug, because, if I remember correctly, the example we mentioned is within a section about RTF templates, so it should work.
    Anyway, I found a workaround. Based on the example where the CASE switch is used: you just draw all the posible formats (including background color) for the rows in your table in your template and conditionally display the correct format for each row. You can use 'IF' instead of 'CASE' (I personally find it easier).
    I hope this helps.
    Greetings.

  • Conditional Sum and look at next record

    First off, here is an example XML structure
    &lt;DATASET&gt;
    &lt;DATASET_ROW&gt;
    &lt;DEPARTMENT&gt;1&lt;/DEPARTMENT&gt;
    &lt;FEE&gt;30&lt;/FEE&gt;
    &lt;DIVISION&gt;Displayed Title&lt;/DIVISION&gt;
    &lt;/DATASET_ROW&gt;
    &lt;DATASET_ROW&gt;
    &lt;DEPARTMENT&gt;1&lt;/DEPARTMENT&gt;
    &lt;FEE&gt;20&lt;/FEE&gt;
    &lt;DIVISION&gt;Displayed Title2&lt;/DIVISION&gt;
    &lt;/DATASET_ROW&gt;
    &lt;DATASET_ROW&gt;
    &lt;DEPARTMENT&gt;1&lt;/DEPARTMENT&gt;
    &lt;FEE&gt;40&lt;/FEE&gt;
    &lt;DIVISION&gt;Displayed Title3&lt;/DIVISION&gt;
    &lt;/DATASET_ROW&gt;
    &lt;DATASET_ROW&gt;
    &lt;DEPARTMENT&gt;2&lt;/DEPARTMENT&gt;
    &lt;FEE&gt;30&lt;/FEE&gt;
    &lt;DIVISION&gt;Displayed Title 5&lt;/DIVISION&gt;
    &lt;/DATASET_ROW&gt;
    &lt;DATASET_ROW&gt;
    &lt;DEPARTMENT&gt;2&lt;/DEPARTMENT&gt;
    &lt;FEE&gt;80&lt;/FEE&gt;
    &lt;DIVISION&gt;Displayed Title 6&lt;/DIVISION&gt;
    &lt;/DATASET_ROW&gt;
    &lt;DATASET_ROW&gt;
    &lt;DEPARTMENT&gt;3&lt;/DEPARTMENT&gt;
    &lt;FEE&gt;90&lt;/FEE&gt;
    &lt;DIVISION&gt;Displayed Title 7&lt;/DIVISION&gt;
    &lt;/DATASET_ROW&gt;
    &lt;DATASET_ROW&gt;
    &lt;DEPARTMENT&gt;3&lt;/DEPARTMENT&gt;
    &lt;FEE&gt;90&lt;/FEE&gt;
    &lt;DIVISION&gt;Displayed Title 8&lt;/DIVISION&gt;
    &lt;/DATASET_ROW&gt;
    &lt;DATASET_ROW&gt;
    &lt;DEPARTMENT&gt;4&lt;/DEPARTMENT&gt;
    &lt;FEE&gt;30&lt;/FEE&gt;
    &lt;DIVISION&gt;Displayed Title 9&lt;/DIVISION&gt;
    &lt;/DATASET_ROW&gt;
    &lt;/DATASET&gt;
    Is there any way to get a sum of a field grouped by two different fields? Example in my RTF I have a repeating group based on DIVISION which inserts section breaks. Using the example I have posted here what I have in my RTF template is a sum of FEE (assume there are multiple records for DIVISION though only 1 is shown here) that displays on every page for the current group. Each DIVISION is printed on its own page. However, at the end of each DEPARTMENT, I also need to print a summary total of the sum of FEE over all records for that DEPARTMENT on the same page as the last page of the last DIVISION.
    So far, I have been able to get it to do the subtotals for each DEPARTMENT as they are within the scope of my loop. The tricky part I am unsure of how best to go about doing is getting and displaying the conditional grand total. My initial idea was to use a variable and do it manually in my template but then I relaized I did not know how to find out if the next record was the first record in the next Department or not. In this case, I am hoping to stick within the realm of using straight SQL Query as my datasource because its already done. The other option I considered was nested loops and a data template but then I realized that I wasn't too sure about manually inserting the section breaks.
    Any thoughts?

    Yes, you can do that,
    Pass me the template and XML :)
    <?if:position() = last()?>
    Last Record
    <? end if ?>
    then display the sub-total for department at the last division.
    This link , gives you idea of , how to display at the last
    http://blogs.oracle.com/xmlpublisher/2008/08/continued.html
    Use
    xdofo:inline-total display-condition="last"

  • Conditional Sum... dynamic Date range MDX

    Hi
    i had question just now and got the right answer for it. That was great. However, I ran and the result was not right.
    It turned out I can not just sum up sales from the current date to the last date of sales but add one extra condition.
    I have three dimensions: Invoice Date, Licence Start Date, Licence End date. I need to add a condition saying only sales with licence start date is equal or early than current licence end date for the below query.
    I am looking at Filter function in MDX book right now. ahh It's been too long since I used the MDX last time. This is kinda urgent. Any help would be appreciated.
    I have added the condition as follows. It is not right because I got the same result as the first one. It should be less.
    And I think it's because the current member of licence start date for the expired month invoices are not applied right. 
    With member MEASURES.ActiveLicences as 
    sum ( 
    Filter(
    {[License Expiry Date].[FinancialYear].CurrentMember: null },
    ([Licence Start Date].[Financial_Year].CurrentMember <= [License Expiry Date].[FinancialYear].CurrentMember)
    [Measures].[No of Students]
    select {
    MEASURES.ActiveLicences,
    [Measures].[No of Students] } on columns, 
    [License Expiry Date].[FinancialYear].[YY-MMM].members on rows 
    from [Sales];
    from 
    With member MEASURES.ActiveLicences as 
    sum ( 
    {[License Expiry Date].[FinancialYear].CurrentMember: null },
    [Measures].[No of Students]
    select {
    MEASURES.ActiveLicences,
    [Measures].[No of Students] } on columns, 
    [License Expiry Date].[FinancialYear].[YY-MMM].members on rows 
    from [Sales];
    Kind regards

    Hi Sqlma,
    According to your description, you are going to sum the measure for the members with the dondition that licence start date is equal or early than current licence end date for the below query, right?
    In this case, you need filter out the members that licence start date is equal or early than current licence end date for the below query. And then sum the total measures using sum function. I have tested it on my local environment, here is a sample query
    for you reference.
    with set [aa]
    as
    filter
    ([Product].[Product Categories].members,
    [Measures].[Internet Sales Amount]>30000)
    member [measures].[b]
    as
    sum([aa],[Measures].[Internet Sales Amount])
    select {[Measures].[Internet Sales Amount],[measures].[b]} on 0,
    [aa] on 1
    from [Adventure Works]
    where [Date].[Calendar].[Calendar Year].&[2008]
    Regards,
    Charlie Liao
    TechNet Community Support

  • Sum / Format on APEX_ITEM.TEXT columns

    Hi! I have two questions :
    In apex 3.2, on an updateable report, I am using APEX_ITEM.TEXT for a column.
    1) The data contained in this cell are hours (so numeric and the sum should work). I am not able to get a sum on this column. I am checking the "sum" field in the report attributes. All in can see is the last line with "0" in it.
    Anybody has an idea on how to have the sum on this column?
    2) How can I have a format on the APEX_ITEM.TEXT column ? I tried to put 90D0 in the number/date format but it does nothing.
    Thanks!
    Amelie
    Edited by: user13485643 on Feb 8, 2011 12:30 PM

    Sorry, it was long before I answer.
    First of all, thank you so much for your idea! I am now able to get the sum dynamically! Here's how :
    I created this javascript function. The variable myName is the name of the inputs and myHeader is the value you get in the td tag <td class="t20data" headers="HrsDim">
    function updateSum(myName, myHeader)
         myArray = document.getElementsByName(myName);
         mySum = 0;
         for (var i=0; i < myArray.length; i++)
              val = myArray.value
              if (val == Number(val)){
                   mySum = mySum + Number(val);
         $('td[headers=' + myHeader + ']').last().text(mySum).addClass("sum");
    In my apex item's attribute I added this :onchange="updateSum(this.name, 'HrsDim')"
    Works like a charm!!
    Thanks again!!!
    Edited by: Amelie on Feb 17, 2011 8:06 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Complex Condition Type for Discount Needs Assistance

    Is it possible to have this kind of requirements ?
    No of cases               Powder Tea/Fruit                            
                                Base    Cash    Total           
    1-9 cs                   10.00   10.00   20.00           
    10-19 cs               20.00   10.00   30.00            
    20-49 cs               25.00   10.00   35.00         
    50 cs & above       30.00   10.00   40.00          
    No of cases                Water  
                              Base      Cash    Total 
    1-9 cs                 3.00       2.00      5.00
    10-19 cs              8.00       2.00     10.00
    20-49 cs              13.00      2.00     15.00       
    50 cs & above       20.00      2.00     22.00
    No of cases                 RTD-PET   
                               Base   Cash  Total
    1-9 cs                  4.00      3.00    7.00
    10-19 cs              7.00      3.00   10.00
    20-49 cs             12.00     3.00    15.00    
    50 cs & above      17.00     3.00     20.00
    Sample products
    POWDER TEA/FRUIT
         1. Mango powder
         2. Lemon powder
    RTD PET
        1. Pineapple 500 ml
        2. Orange 500 ml
    WATER
        1 Purewater
    Scenario 1:
    Customer is purchasing the following:
    Mango powder - 25 cs
    How much will be the total discount?  SInce the customer orrdered 25 cs, the total discount that will be given is Php 35.00 based on matrix above.
    However,,
    Scenario 2.
    If the customer purchased a combination of
    Mango powder -10 cs
    Pineapple 500 ml - 20 cs
    Purewater - 20 cs
    The total discount that should be give are:
      Mango powder - PHP 40.00
      Pineapple - PHP 20.00
      Purewater - __PHP 22.00__
            total discount : PHP 82.00
    The prolem we encountered is we cannot do the total of all products given on the matrix above.The system reads the discount per line item. We need to generate first the total orders so we can get the correct computed discount base on the matrix.

    Hi Jefferson Thomas Javier,
              To take in account the whole quantity of items to calculated the discount condition, you should make the condition type of discount as a Group condition (it is a check box within the configuration of the condition price), in this way the quatity taken to calculate the discount is the sum of all items.
    Thanks,
    Mariano.

  • Conditional color formating in SSRS 2005

    Hi
    I have a report with customers bill amount and bill date. The customers have to pay within a grace period of 21 days after bill date
    I want to conditionally format the bill_date column so that when the number of days after the 21 days grace period is within 7 days then no color,30 days then blue, 61-90 days then Red
    Thanks a lot
    Please very urgent
    CRM Manager

    Hi!
    I have almost the same doubt.
    Have a date time field, what i need is to change the BackgroundColor if the date
    exceeds 6 months or another background if exceeds 1 year.
    Obviously i have to compare the date shown on my report with the
    current date.
    I know that i have to use an expression in the BackgroundColor property of textbox.
    Thanks !!!
    Please need help!!

Maybe you are looking for

  • Import Manager 'Error 5611520 - Error Saving Key Mapping'

    I am using CREDITOR_EXTRACT in R/3 to send Vendor IDoc to XI and use CREMDM04 type.  XI generates an XML file that I load into MDM using a client that is set up for Inbound/Outbound.  The key mappings have been turned on for the Vendor repository. In

  • Link iWeb Navigation Bar to External Page

    I want to add a link in the nav bar to my MobileMe Gallery page. On my old website origonally built with iWeb 2006, I created a blank page and then edited the index.html file for the site with the url for the Gallery. With iWeb 2011 (or is it 2009?),

  • Photoshop CS6 Extended x64 Win7 bug, color overlay layer effect

    I created a simple layer shape using the elipse shape tool, and applied a color overlay (blue) layer effect to that shape. The applied color overlay doesn't fill the entire shape (see image) making it look like the shape has a very wide stroke applie

  • ECC 6.0 EHP4 and BI 7.0

    We are planning to upgrade ECC 6.0 to EHP4 and our BI 7.0 system is on SPS 16 (BI SP 18). Did anyone face any issues with extractors after applying ECC 6.0 EHP4? I found note 1295252 for FI GL issue, other than that I could not find any other notes.

  • Transferring iTunes playlists etc to new computer

    Hi, i currently have all my music saved on an external hard drive & when i want to play music, i connect my hard drive via USB to my computer, startup iTunes where all my playlists which i have created etc are & it reads the music from the external h