Condition for Excluding Top N values

HI,
I have a requirement wherein..The Total value of Customers Excluding Top 15 needs to be displayed
Does some one have idea on how to define this condition?
Thanks in advance
Sriman

there is a workaround..
if that is feasible for ur users
lets say u have 100 customers, so
excluding top 15 = including bottom 85
but its not true that u will have 100 customers ,
so instead the work around is use %, instead of exact values = 15
try to use condition on Keyfigure
Select new condition
select keyfigure
select BOTTOM %
value = 85
if that is

Similar Messages

  • Condition for excluding Sales value less than or equal to 0

    Hello Experts,
    I have to create condition in the query designer to exclude Sales Value <=0, and that should be applied to all the column values and result values when we put active.
    Can anyone help ?
    Thanks in advance,
    Venky
    Duplicate Post
    Condition for excluding Sales value less than or equal to 0
    Edited by: Arun Varadarajan on Apr 13, 2010 8:57 PM

    Hello Naveen,
    Thanks for quick reply. I have created condition greater than zero and executed report, i can able to eliminate rows with sales value <=0, but we have other columns in the report say Quantity, Backlog... when we run the report without condition the values which showed are same when we put it in active aslo.
    After eliminating few rows which having some quantity value, that value should be deducted from the result of the quantity. I tried with applying apply to results opton, then also there is no change in the result value of the quantity.
    Our requirement is to apply condition to eliminate rows which are sales value <=0 and same the result values of the columns should effect.
    Is it possible in anyway, if yes please specify solution.
    Thanks,
    Venky

  • How to display top 10 values in a Webi report?

    Hi,
    I have the following requirement.
    If the report contains 'State' and 'Revenue' columns, I need to display top 10 cities with highest revenue and the revenue of the remaining cities can be summed together and should be available in a separate cell.
    I tried several formulae to achieve the requirement but was unsuccessful.
    I created a variable using the formula: '= If (Rank(<State> ,<Sales revenue>)>10 ) Then Sum(<Sales revenue>) Else 0' and added it as a column in the report. This provides the required results.
    When I add this variable as a column in the report, it displays 0 for the first top 10 values and only displays the remaining values. After that we can apply the Sum on this column to get the sum of the remaining (Other) sales revenue excluding top 10 values. However I cannot display this sum in a separate cell.
    Please provide some suggestions on this.
    Regards,
    Aditya Joshi

    Hi Aditya,
    Could you please try the following solutions to resolve the issue.
    Solution1:
    In Oracle, there is a function called: RANK() OVER (PARTITION BY () ORDER BY ()) which can be used to define an object at Universe level to return a rank position when used in a report. If you can check with your DBA - there is a similar function available for SQL Server. It should be RANK() OVER (ORDER BY colname) AS () FROM.
    Solution2:
    Or you can also try returning all rows in query, apply sort at report level & apply alerter to highlight the top 10 values.
    Regards,
    Sarbhjeet Kaur

  • Exclude records with value 0 for calculated KF

    Hi, experts,
    How do I Exclude records with value 0 for calculated KF without using condition?  I'm using version 7
    Appreciate any help you can provide.
    Thank You!
    Alina

    Hi,
    We didn't understood ur requirement well.
    1) Lets say, you have 3 KF. and you are doing CKF1 and you don't want to show the records with Zero, In that case you can go with Zero Record Supression.
    2) If you want to try to delete only KF/CKF where there is zero, it won't work as others may have values in them and you may miss the whole record set in the report
    3) If the zero result is part of calculation, then please go ahead as explained above.
    Please explain clearly if this is what you have or is it different ?
    Regards,
    -S-

  • Condition for Top 10 no longer working with 2 Characteristics

    Hi experts, we have a query within a workbook with a condition set on 2 characteristics to show the top ten.  When we refresh this now it shows incorrect results as it unticks one of the characteristics in the condition.  We then have to go back to the condition set up and tick the one it unticked and it refreshes okay.  We don't want to have to do this each time.  (This worked for us prior to applying patches.  We are on Patch 18, Bex Analyzer BI Add-On 7.X based on 7.10, Support package 7, patch 1 version 1352.)
    We can't find any SAP Note to correct this?
    Any help you can offer would be great.
    Thanks.
    N

    Hi,
    I too have faced problem with conditions.As a thumb rule if i apply(assaign) the condition for the last characteristics in the tab rows (or last charactristic added in rows) giving fine results.
    Try to apply and check it may work....
    Regards,
    anil

  • What is meaning of  top % 100 values in condition

    hi ,
    i have exact meaning of   top %  100 values in conditions.
    here when ever i ran report it will come out put different values.
    the output comes interms of 6000 records.
    Regards,
    Murali

    Murali what Bhanu mentioned will work as thus...
    Assume that you get 3 records......
    Vendor| Sales
    V1 | 100
    V2|200
    V3|300
    Assume that you have got the query output as above where it sorts on the order of Vendor - but then if you want the same to sort on a KEYFIGURE - Sales - then if you apply this condition you would get
    V3|300
    V2|200
    V1|100
    Arun
    Hope it helps....

  • Env variable for custom top showing diffent values

    hi,
    we cloned the prod to UAT then the
    value for env variable for custom top showing different values.
    ie,
    backend it is showing
    echo $XXECO_TOP
    /oracle/UAT/apps/apps_st/appl/xxeco/12.0.0 (this is the correct value)
    from the front end when we submit the "print environment variable" concurrent request it shows the following incorrect value
    /dev/oracle/app/oraprod/apps/apps_st/appl/xxeco/12.0.0 (this is prod value)
    please let us know how to correct the value
    Edited by: 831498 on Feb 18, 2011 6:26 AM

    Hi,
    Post your Query to http://forums.oracle.com/forums/forum.jspa?forumID=475
    Regards,
    Gyan

  • Result Type Condition for Multi value Manage Property not working

    Hi All,
    I have created one template & I wanted to show this template on particular condition. So I created the result type. The Managed property (MP) that I used, I have verified its attributes all attributes are selected and its type is Multi value. I am trying
    to apply the "Show fewer conditions" and some how the value not matched.
    I have checked MP ; it has all the values but some how the template not called. When I removed this condition it working and when choose other MP other then Multi valued. It is working as expected.
     Please let me know if i miss something here. 
    PS: I have checked each option from the Query drop down like "Equals any of" and "Contains any of" not working in case of multi value attribute. Please help.
    I have explain this issue more details in this post : http://sharepointfordeveloper.blogspot.com/2015/02/sharepoint-search-2013-result-type-with.html
    Regards,
    Basant Pandey
    http://sharepointfordeveloper.blogspot.com

    Update on above mentioned issue.
    I have verified the same at my end. So I come to this conclusion this is product issue. Either need to raise the ticket to Microsoft related to this issue.
    Regards,
    Basant Pandey
    http://sharepointfordeveloper.blogspot.com

  • What is the condition for First write statement in reports?

    What is the condition for First write statement in reports?

    In
    TOP-OF-PAGE & START-OF-SELECTION.
    U have to write what ever u want to dispaly.
    Top-of-page will trigger first and write the statements.
    SAmple report program for reference.
    REPORT ztemplate
              NO STANDARD PAGE HEADING
              LINE-SIZE 130
              LINE-COUNT 65
              MESSAGE-ID zm.
    * The Data Declarations
    TABLES:    mara." General Material Data.
    * Type Declarations:
    TYPES : BEGIN OF ty_mara,
              cb(1),
              matnr LIKE mara-matnr,
              mtart LIKE mara-mtart,
              matkl LIKE mara-matkl,
             END OF ty_mara.
    * Internal Tables:
    * The following structure type must be defined in the data dictionary
    DATA :  i_output TYPE ty_mara OCCURS 0 WITH HEADER LINE.
    DATA: lines TYPE i, free TYPE i.
    * The Selection Screen Definition
    SELECTION-SCREEN BEGIN OF BLOCK b_main WITH FRAME TITLE text-b01.
    *SELECTION-SCREEN skip.
    SELECT-OPTIONS: s_matnr FOR  mara-matnr.                  "Material No
    *PARAMETERS:     P_XXXXX like XXXX-XXXXX.                   "Description
    *PARAMETERS:     CB_XXXX as checkbox.                       "Description
    *PARAMETERS:     RB_XXXY radiobutton group XXX default 'X'. "Description
    *PARAMETERS:     RB_XXXZ radiobutton group XXX.             "Description
    *SELECTION-SCREEN COMMENT fmt name.
    SELECTION-SCREEN END OF BLOCK b_main.
    *SELECTION-SCREEN ULINE.
    *eject
    * INITIALIZATION
    INITIALIZATION.
    * AT SELECTION-SCREEN
    AT SELECTION-SCREEN.
    *Validate material no details
    IF NOT s_matnr[] IS INITIAL.
    LOOP AT s_matnr.
    IF NOT s_matnr-low  IS INITIAL.
      SELECT SINGLE matnr INTO v_matnr
             FROM mara
             WHERE matnr = s_matnr-low.
      IF sy-subrc NE 0.
        MESSAGE i128.
        LEAVE LIST-PROCESSING.
      ENDIF.
      ENDIF.
    IF NOT s_matnr-high IS INITIAL.
      SELECT SINGLE matnr INTO v_matnr
             FROM mara
             WHERE matnr = s_matnr-high.
      IF sy-subrc NE 0.
        MESSAGE i128.
        LEAVE LIST-PROCESSING.
      ENDIF.
      ENDIF.
    ENDLOOP.
    ENDIF.
    * START-OF-SELECTION
    START-OF-SELECTION.
       REFRESH: i_output.
      CLEAR  : i_output.
      SELECT matnr
             mtart
             matkl
             INTO TABLE i_output
             FROM mara
             WHERE mara~matnr IN s_matnr.
      IF sy-subrc NE 0.
        MESSAGE i000 WITH text-002.
        " No records found for selected criteria
            leave list-processing.
      ENDIF.
      IF NOT i_output[] IS INITIAL.
        LOOP AT i_output INTO wa_output.
          WRITE:/001 wa_output-cb AS checkbox,
                 003 wa_output-matnr,
                 015 wa_output-mtart,
                 024 wa_output-matkl.
          CLEAR wa_output.
        ENDLOOP.
      ENDIF.
    * END-OF-SELECTION
    END-OF-SELECTION.
      lines = sy-linno - 1.
    SET PF-STATUS 'ZSTATUS'.
    AT USER-COMMAND.
          wa_output-cb = space.
          SET PF-STATUS 'ZSTATUS' EXCLUDING 'SAVE'.
          DO lines TIMES.
            READ LINE sy-index FIELD VALUE wa_output-cb.
              IF wa_output-cb = 'X'.
            MODIFY i_output  FROM wa_output INDEX sy-tabix TRANSPORTING cb.
            ENDIF.
          ENDDO.
    CASE sy-ucomm.
    WHEN 'SAVE'.
          DELETE i_output WHERE cb = 'X'.
    WHEN 'BACK'.
    LEAVE SCREEN.
    ENDCASE.
    * TOP-OF-PAGE.
    TOP-OF-PAGE.
      ULINE.
      FORMAT INTENSIFIED OFF.
      FORMAT COLOR COL_HEADING.
      WRITE:/001 'CB' ,
             003 'Material No',
             015 'Mat type',
             024 'Mat group'.
      FORMAT COLOR OFF.
      FORMAT INTENSIFIED ON.
      ULINE.

  • Prompt for setting Top N

    I have a report to list top N sources of data. For my report, I have 12 prompt fields excluding the prompt for setting the top N value. The report is working fine with the 12 prompts some of which are constrained. All the prompts have "All Choices" as default values. The moment I add the prompt for the top N, the constrained prompts do not show any value in the drop-down. To provide a little more perspective, this is what I have done to create the top N prompt:
    Used any random field and then changed the fx with hard value 1. Selected "Edit Box" for the control. The specific value has been set to 5. Using a presentation variable.
    However, if I add this prompt with its own "Go" button, then I do not see the issue described above. I would not like to have 2 "Go" buttons.
    Please let me know what I am missing here to make it work.
    Thanks.
    Bhusan

    As you said, 'All the prompts have "All Choices" ', this is one of the requirement's for the constrain to work. I believe that to get the constrain values, you might have used a SQL query
    and you are getting the values. In that case, as per my knowledge, you cannot constrain a dashboard prompt when you are using SQL Results.
    Constrained columns will be constrained by all other columns in the prompt. For example, if the prompt contains columns Year, Region, and District, and Constrain is checked for District, the values shown in District will be limited by the values entered in Region and Year.
    Thanks,
    Chandu.

  • RegExp for excluding special characters in a string.

    Hi All,
    Im using Flex RegExpValidator. Can anyone suggest me the correct expression to validate this condition?....
    I have tried this expression :----- /^[^///\/</>/?/*&]+$/...But in this it is also negating the alphabets.Also I have tried with opposite condition that in the String we should have alphabets and the expression is:-- ([a-z]|[A-Z]|[0-9]|[ ]|[-]|[_])*..... Please can anyone help me on this.
    Thanks in advanced to all.
    Munira

    sorry but you are posting things back that do not make any sense
    what do you mean with the below comment?
    munira06 wrote:
    Yes you are correct ,but I have tried this with single special character
    say
    Re: RegExp for excluding special characters in a string.
    here is a sample app taken from the live docs
    using ^[a-zA-Z0-9 \-_]*$ as the regex accepts all characters from a-z, A-Z, 0-9 - [space] and_
    run the example tell me what regex you are using and what test strings fail when they should pass or pass when they should fail
    <?xml version="1.0" encoding="utf-8"?>
    <!-- Simple example to demonstrate the RegExpValidator. -->
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
            xmlns:s="library://ns.adobe.com/flex/spark"
            xmlns:mx="library://ns.adobe.com/flex/mx">
        <fx:Script>
            <![CDATA[
                import mx.events.ValidationResultEvent;
                import mx.validators.*;
                // Write the results to the
                private function handleResult(eventObj:ValidationResultEvent):void {
                    if (eventObj.type == ValidationResultEvent.VALID) {
                        // For valid events, the results Array contains
                        // RegExpValidationResult objects.
                        var xResult:RegExpValidationResult;
                        reResults.text = "";
                        for (var i:uint = 0; i < eventObj.results.length; i++) {
                            xResult = eventObj.results[i];
                            reResults.text=reResults.text + xResult.matchedIndex + " " + xResult.matchedString + "\n";
                    } else {
                        reResults.text = "";
            ]]>
        </fx:Script>
        <fx:Declarations>
            <mx:RegExpValidator id="regExpV"
                    source="{regex_text}" property="text"
                    flags="g" expression="{regex.text}"
                    valid="handleResult(event)"
                    invalid="handleResult(event)"
                    trigger="{myButton}"
                    triggerEvent="click"/>
        </fx:Declarations>
        <s:Panel title="RegExpValidator Example"
                width="75%" height="75%"
                horizontalCenter="0" verticalCenter="0">
            <s:VGroup left="10" right="10" top="10" bottom="10">
                <s:Label width="100%" text="Instructions:"/>
                <s:Label width="100%" text="1. Enter text to search. By default, enter  a string containing the letters ABC in sequence followed by any digit."/>
                <s:Label width="100%" text="2. Enter the regular expression. By default, enter ABC\d."/>
                <s:Label width="100%" text="3. Click the Button control to trigger the validation."/>
                <s:Label width="100%" text="4. The results show the index in the text where the matching pattern begins, and the matching pattern. "/>
                <mx:Form>
                    <mx:FormItem label="Enter text:">
                        <s:TextInput id="regex_text" text="xxxxABC4xxx" width="100%"/>
                    </mx:FormItem>
                    <mx:FormItem label="Enter regular expression:">
                        <s:TextInput id="regex" text="ABC\d" width="100%"/>
                    </mx:FormItem>
                    <mx:FormItem label="Results:">
                        <s:TextInput id="reResults" width="100%"/>
                    </mx:FormItem>
                    <mx:FormItem >
                        <s:Button id="myButton" label="Validate"/>
                    </mx:FormItem>
                </mx:Form>
            </s:VGroup>
        </s:Panel>
    </s:Application>

  • Filter in Query Designer for Excluding some records

    HI!
    i am new to BI ,
    I Designed  Query on 0PUR_C01 Cube for displaying top 10 Vendors .
    The query is working fine now i want to exclude those vendor numbers from report which starts with letters 'IUV'.
    the info object i am using is 0VENDOR.
    Please Help...
    Thanks.

    Hi,
    Create a customer exit variable on 0vendor . Following is the property of the variable to be maintained .
    Type of Variable: Characteristic Value.
    Processing By: Customer Exit.
    Variable Represents: Multiple Single Values.
    Variable Entry is: Mandatory, Not Ready for Input and Cannot be changed in Query Navigation   
      WHEN 'zvendor'.
            IF I_STEP = 1.
              DATA: ITAB TYPE STANDARD TABLE /BI0/SVENDOR .
             data : wa type /BI0/SVENDOR
              SELECT * FROM /BI0/SVENDOR INTO TABLE ITAB  WHERE DEPT_ID LIKE 'IUV%' .
              CLEAR: L_S_RANGE.
              L_S_RANGE-SIGN = 'E'.
              L_S_RANGE-OPT = 'EQ'.
              LOOP AT ITAB into wa.
                L_S_RANGE-LOW = wa-DEPT_ID.
                APPEND L_S_RANGE TO E_T_RANGE.
              ENDLOOP.
              CLEAR L_S_RANGE.
            ENDIF.
    or
    WHEN 'zvendor'.
            IF I_STEP = 1.
              DATA: ITAB TYPE STANDARD TABLE /BI0/SVENDOR .
             data : wa type /BI0/SVENDOR
              SELECT * FROM /BI0/SVENDOR INTO TABLE ITAB  WHERE DEPT_ID NOT LIKE 'IUV%' .
              CLEAR: L_S_RANGE.
              L_S_RANGE-SIGN = 'I'.
              L_S_RANGE-OPT = 'EQ'.
              LOOP AT ITAB into wa.
                L_S_RANGE-LOW = wa-DEPT_ID.
                APPEND L_S_RANGE TO E_T_RANGE.
              ENDLOOP.
              CLEAR L_S_RANGE.
            ENDIF.
    Hope the above reply was helpful.
    Thanks & Regards,
    Ashutosh Singh
    Edited by: Ashutosh Singh on Apr 27, 2011 12:47 PM

  • Requirement for surcharge if order value under a specified amount

    I am trying to create a surcharge that will only apply if the overall value of the order is under a specified amount.
    The objective is to add a surcharge of $50.00 if the total order value is less than $500.
    Any insights are appreciated.
    Thanks
    TC

    Thanks Sai.
    I followed your suggestion and it is working, thank you.
    Now one more twist.
    We have a pricing condition for pallets and other container items included in our Net Value sum. It is located above the actual price conditions in the price procedure. I would like to exclude the value of these from the document total in order to determine whether or not to apply the surchage.
    For example:
    Pallet charge is $50.00
    Sales order value: $475.00
    Threshold value for apoplication of surcharge = $500.00
    In the example above the surcharge would need to apply. Even though the net value of the order would be $$525.00, over the threshold amount.
    This is an example of our pricing procedure.
    Step Counter  Cond. Type   Description
    106     0     ZPAL     Pallet Charge
    114     0     PR00     Price-Cust Specific
    116     0     ZPR8     Zone Pricing
    118     0     ZPR9     Price List
    120     0          Net Value for Item
    125     0     ZMDC     Min. Value Charge
    I need to exclude the ZPAL conditon value from the amount in which to base my surcharge on. One issue is all of the standard subtotals are in use and unavailable in this instance.
    I hope I am clear.
    Thanks

  • How to get top 11 values per date range

    I want to get the top 11 values by date range.
    Sample Data
    CREATE TABLE SAMPLE_DATA
        DOMAIN_NAME VARCHAR2(100),
        QTD         NUMBER,
        LOAD_DATE   DATE
    -- Insert
    BEGIN
      FOR lc IN 1..20
      LOOP
        FOR ld IN 1..30
        LOOP
          INSERT
          INTO SAMPLE_DATA VALUES
              'DM_'
              ||lc,
              round(dbms_random.value(0,1000)),
              SYSDATE-ld
        END LOOP;
      END LOOP;
    COMMIT;
    END;
    SELECT *
    FROM
      (SELECT DOMAIN_NAME,
        QTD,
        LOAD_DATE
      FROM
        (SELECT DOMAIN_NAME,
          QTD,
          LOAD_DATE
        FROM SAMPLE_DATA
        WHERE LOAD_DATE = TRUNC(SYSDATE-3)
        ORDER BY QTD DESC
      WHERE ROWNUM <=10
      UNION ALL
      SELECT 'Others' DOMAIN_NAME,
        SUM(QTD) QTD,
        LOAD_DATE
      FROM
        (SELECT DOMAIN_NAME,
          QTD,
          LOAD_DATE
        FROM
          (SELECT rownum rn,
            DOMAIN_NAME,
            QTD,
            LOAD_DATE
          FROM
            (SELECT DOMAIN_NAME,
              QTD,
              LOAD_DATE
            FROM SAMPLE_DATA
            WHERE LOAD_DATE = TRUNC(SYSDATE-3)
            ORDER BY QTD DESC
        WHERE rn > 10
      GROUP BY LOAD_DATE
    ORDER BY QTD DESC
    -- Result
    DOMAIN_NAME                 QTD                         LOAD_DATE                  
    Others                      2888                        24/03/13                   
    DM_1                        1000                        24/03/13                   
    DM_20                       933                         24/03/13                   
    DM_11                       913                         24/03/13                   
    DM_3                        743                         24/03/13                   
    DM_13                       572                         24/03/13                   
    DM_12                       568                         24/03/13                   
    DM_9                        564                         24/03/13                   
    DM_6                        505                         24/03/13                   
    DM_5                        504                         24/03/13                   
    DM_2                        480                         24/03/13    
    Please, Help me get in one query this result using a range of date.
    e.g
    using LOAD_DATE BETWEEN '24/03/13' AND '25/03/13'
    DOMAIN_NAME                 QTD                         LOAD_DATE                  
    Others                      2888                        24/03/13                   
    DM_1                        1000                        24/03/13                   
    DM_20                       933                         24/03/13                   
    DM_11                       913                         24/03/13                   
    DM_3                        743                         24/03/13                   
    DM_13                       572                         24/03/13                   
    DM_12                       568                         24/03/13                   
    DM_9                        564                         24/03/13                   
    DM_6                        505                         24/03/13                   
    DM_5                        504                         24/03/13                   
    DM_2                        480                         24/03/13                     
    Others                      1948                        25/03/13                   
    DM_1                        807                         25/03/13                   
    DM_8                        764                         25/03/13                   
    DM_7                        761                         25/03/13                   
    DM_11                       656                         25/03/13                   
    DM_18                       611                         25/03/13                   
    DM_17                       523                         25/03/13                   
    DM_14                       467                         25/03/13                   
    DM_19                       447                         25/03/13                   
    DM_15                       437                         25/03/13                   
    DM_6                        380                         25/03/13             Thank you in advance.

    I got the solution. Just sharing.
    I used analytic functions that make my job easy.
    Sample Data
    DOMAIN_NAME                 QTD                         LOAD_DATE                  
    DM_1                        807                         25/03/2013                 
    DM_1                        1000                        24/03/2013                 
    DM_2                        226                         25/03/2013                 
    DM_2                        480                         24/03/2013                 
    DM_3                        244                         25/03/2013                 
    DM_3                        743                         24/03/2013                 
    DM_4                        48                          25/03/2013                 
    DM_4                        413                         24/03/2013                 
    DM_5                        164                         25/03/2013                 
    DM_5                        504                         24/03/2013                 
    DM_6                        380                         25/03/2013                 
    DM_6                        505                         24/03/2013                 
    DM_7                        761                         25/03/2013                 
    DM_7                        212                         24/03/2013                 
    DM_8                        764                         25/03/2013                 
    DM_8                        308                         24/03/2013                 
    DM_9                        354                         25/03/2013                 
    DM_9                        564                         24/03/2013                 
    DM_10                       214                         25/03/2013                 
    DM_10                       367                         24/03/2013                 
    DM_11                       656                         25/03/2013                 
    DM_11                       913                         24/03/2013                 
    DM_12                       37                          25/03/2013                 
    DM_12                       568                         24/03/2013                 
    DM_13                       332                         25/03/2013                 
    DM_13                       572                         24/03/2013                 
    DM_14                       467                         25/03/2013                 
    DM_14                       87                          24/03/2013                 
    DM_15                       437                         25/03/2013                 
    DM_15                       450                         24/03/2013                 
    DM_16                       238                         25/03/2013                 
    DM_16                       299                         24/03/2013                 
    DM_17                       523                         25/03/2013                 
    DM_17                       143                         24/03/2013                 
    DM_18                       611                         25/03/2013                 
    DM_18                       145                         24/03/2013                 
    DM_19                       447                         25/03/2013                 
    DM_19                       464                         24/03/2013                 
    DM_20                       91                          25/03/2013                 
    DM_20                       933                         24/03/2013                  Top 11 QTD of DOMAIN_NAME per Data Range.
    SELECT *
    FROM
      (SELECT DOMAIN_NAME,
        QTD,
        LOAD_DATE
      FROM
        (SELECT LOAD_DATE,
          DOMAIN_NAME ,
          QTD,
          (DENSE_RANK() OVER (PARTITION BY LOAD_DATE ORDER BY QTD DESC )) AS RANK_QTD
        FROM SAMPLE_DATA
        WHERE trunc(load_date) BETWEEN '24/03/2013' AND '25/03/2013'
      WHERE RANK_QTD <= 10
      UNION ALL
      SELECT 'Others',
        SUM(QTD) AS QTD,
        LOAD_DATE
      FROM
        (SELECT LOAD_DATE,
          DOMAIN_NAME ,
          QTD,
          (DENSE_RANK() OVER (PARTITION BY LOAD_DATE ORDER BY QTD DESC )) AS RANK_QTD
        FROM SAMPLE_DATA
        WHERE trunc(load_date) BETWEEN '24/03/2013' AND '25/03/2013'
      WHERE RANK_QTD > 10
      GROUP BY LOAD_DATE
    ORDER BY LOAD_DATE ASC,
      QTD DESC
    DOMAIN_NAME                 QTD                         LOAD_DATE                  
    Others                      2888                        24/03/2013                 
    DM_1                        1000                        24/03/2013                 
    DM_20                       933                         24/03/2013                 
    DM_11                       913                         24/03/2013                 
    DM_3                        743                         24/03/2013                 
    DM_13                       572                         24/03/2013                 
    DM_12                       568                         24/03/2013                 
    DM_9                        564                         24/03/2013                 
    DM_6                        505                         24/03/2013                 
    DM_5                        504                         24/03/2013                 
    DM_2                        480                         24/03/2013                 
    Others                      1948                        25/03/2013                 
    DM_1                        807                         25/03/2013                 
    DM_8                        764                         25/03/2013                 
    DM_7                        761                         25/03/2013                 
    DM_11                       656                         25/03/2013                 
    DM_18                       611                         25/03/2013                 
    DM_17                       523                         25/03/2013                 
    DM_14                       467                         25/03/2013                 
    DM_19                       447                         25/03/2013                 
    DM_15                       437                         25/03/2013                 
    DM_6                        380                         25/03/2013 

  • AJAX Report Refresh  a_report- Condition for display not being validated

    Hi ,
    I have a report which has the following condition for dispaly:
    Exists(SQL query returs atleast one row) - SELECT * from temp1The query for the report is : select * from temp1 Now I have a button on the page and on click of the button I call the below Javascript :
    function f_insert_Temp_table(pTrans){
          var l_Return = null;
          var get = new htmldb_Get(null,$x('pFlowId').value,
                  'APPLICATION_PROCESS=temp_table_insert',206);       // ODP to insert into temp1
          get.add('TRANS_ID_ITEM',pTrans);
          gReturn = get.get('');
         //alert(gReturn);
         //$x_Show('6342610690289435');
         $a_report('6342610690289435','1','15','15');
    }Everything executes fine and the report refreshes the rows but the condition used for display doesn't get checked when I call $a_report() ...
    I can see the ODP execute successfully and row gets inserted into temp1 which means report condition is satisfied .
    If I remove the condition for the report, I can see the report getting refreshed and showing new rows through the $a_Report() call.
    Is there something that needs to be added to the script or $a_report call to validate the condition too ?Is there a way I can validate the region condition too ?
    Appreciate any suggestions/pointers here. I really do not want to refresh the whole page.
    Thanks,
    Dippy
    Edited by: Dippy on Feb 5, 2010 11:05 AM

    Hi Flavio,
    Thanks for your support.I figured where I was going completely wrong.
    Its just that when the page loads for the first time the temp table is empty and hence the report is not being displayed which simply
    means that the report id Im passing into the a_report function is not rendered on the page. Hence no matter what the temp table contains the report id is absent from the page.
    I fixed it as follows :
    Remove the condition for the report.
    Added and item and computed(P_Compute) its value using select count(*) from temp.
    Added an onload JS function which does a $x_Show('Report_Region') if P_Compute > 0 or $x_Hide('Report_Region') if P_Compute <0 .
    Now in my JS function which has an AJAX call to an ODP does an $x_Show('Report_Region').
    Flavioc : the query for my report is simple
    select * from tempIt finally dawned upon me that I'm trying to catch hold of an ID that's not rendered.
    So one issue is solved now the other part would be figuring out how to make $a_report work with pagination etc .

Maybe you are looking for

  • Photoshop CC (2014) keeps on crashing on my Wondows system

    Dear ADOBE, Please HELP. I have paid for a CC Complete and I am encountering several problems. What's worse is it's a struggle to reach you for help or "Customer Care". I struggled finding a way to Chat for help. I left messages on Twitter for help.

  • Is there a "Select all keyframes to the right" command?

    Say in a 16 minute composition, you want to select keyframes from 5 minutes to 16 minutes and shift them earlier in the timeline. Keyframes from 0 to 5 minutes do not change. Can you select multiple keyframes to the right of 5 minutes like this? Perh

  • Hp chromebook and kodak printer

    i have an hp chromebook 14 and for more than a year i have tried to connected to my cloud ready kodak printer without success. please help, i dont have a third device or anything like that it has to be directly from my chromebook to my printer.

  • Connecting two macs using ethernet

    Hi All am attempting to link my iMac and Mabook. I've done it before with a firewire cable, but have forgotten how to. Have tried varios combinations of password and user name, but can't get access to macbook from my imac. Am wanting to transfer phot

  • Cant open ipod 4th gen camera!

    I open the app and the shutter wont open. ive tried restarting and resetting. nothing works. help!