Distinct

hello,
is there any possibility in Forms to suppress duplicates.
For example an attribute of forms...

Ömer,
I don't think that your question is clear enough to understand. Can you provide more details of what you want?
Frank

Similar Messages

  • Query help in select Distinct on one column.

    CREATE GLOBAL TEMPORARY TABLE Table1 (
    ID1 varchar2(100) ,
    Name1 varchar2(100),
    Name11 varchar2(100)
    insert into Table1 values ('a','n1','h3');
    insert into Table1 values('b','n2','h2');
    insert into Table1 values('a','n3','h1');
    insert into Table1 values('c','n4','h5');
    insert into Table1 values ('c','n5','h4');
    insert into Table1 values('d','n6','h6');
    select * from Table1;
    ID1,NAME1,     NAME11
    a,     n1,     h3
    b,     n2,     h2
    a,     n3,     h1
    c,     n4,     h5
    c,     n5,     h4
    d,     n6,     h6
    I am trying to select distinct ID1 and all values associated with it which is max row.I want to result as -
    ID1,NAME1,     NAME11
    a,     n3,     h1
    b,     n2,     h2
    c,     n5,     h4
    d,     n6,     h6
    Can you please help me to write simple query to get above result.
    Edited by: 871447 on Jul 25, 2011 9:42 AM
    Edited by: 871447 on Jul 25, 2011 9:45 AM

    Hi,
    Do a self-join, to combine the two rows for each value of id1 onto one output row.
    Make it an outer join, in case there is only one row with a vlaue for id1.
    SELECT  l.id1
    ,     l.name1
    ,     NVL ( r.name11
             , l.name11
             )          AS name11
    FROM              table1     l
    LEFT OUTER JOIN     table1     r  ON  l.id1     = r.id1
                              AND l.name1     < r.name1
    ;Edited by: Frank Kulash on Jul 25, 2011 12:57 PM
    Sorry, I mis-read the problem.
    Lee's solution, above, assumes that name1 is unique, as it is in your sample data.
    What output would you want if that's not the case?
    If name1 is not unique, but the combination of (id1, name1) is unique, then you can modify Lee's solution like this:
    SELECT  *
    FROM    table1
    WHERE   (id1, name1) IN (
                        SELECT    id1
                        ,       MAX (name1)
                               FROM          table1
                        GROUP BY  id1
    ;Or, if you can't make any assumptions about uniqueness, you might need something like this:
    WITH     got_r_num     AS
         SELECT  id1, name1, name11
         ,     ROW_NUMBER () OVER ( PARTITION BY  id1
                                   ORDER BY          name1     DESC
                             ,                name11     DESC
                           )      AS r_num
         FROM     table1
    SELECT  id1, name1, name11
    FROM     got_r_num
    WHERE     r_num     = 1
    ;

  • No distinction between NULL and space

    No distinction between NULL and space. When you see the resultset, in PL/SQL developer, you will see that the NULL value is in yellow colour while column data having spaces is in white colour. In the new tool, there is not distinction between the two, so each time we will have to use the NVL function to determine the value in the column, which I would not like to do.

    An option in Preferences could be created, so that it was possible to choose as values NULL would be shown, as already it occurs in other tools.

  • ORA-1489 error but only sometimes...when not having distinct or another function working

    So when I enter:
    SELECT opened_by from(
    SELECT  ps."NUMBER",
    ps.opened_by,
    ps.assignee_name,
    ps.closed_by,
    listagg(att.type,',') within group(order by att.type) actions,
    listagg(att.description_txt,',') within group (order by att.description_txt) descs
    from tableps ps
    LEFT JOIN activity_txt att ON ps."NUMBER" = att."NUMBER" and att.type in('Assignment','Reassignment')
    where open_time between to_date('01-OCT-2012','DD-MON-YYYY') and to_date('31-OCT-2013','DD-MON-YYYY')
    and ((ps.opened_by=ps.closed_by) and (ps.closed_by=ps.assignee_name) and (ps.assignee_name=ps.opened_by))
    group by ps."NUMBER",ps.opened_by,ps.assignee_name,ps.closed_by
    where (actions not like '%Reass%'or actions is null)
    and (descs like ('%NONE to '|| opened_by ||'%') or descs is null)
    and (descs not like '%,%' or descs is NULL);
    All is well in the world...however when I add distinct to the outer select I get the
    ORA-01489: result of string concatenation is too long
    01489. 00000 -  "result of string concatenation is too long"
    *Cause:    String concatenation result is more than the maximum size.
    *Action:   Make sure that the result is less than the maximum size.
    I don't understand the difference why one would work and one doesn't.         

    I little changed your quesry,
    Please try, if you are getting same error, then it means you have very  large desciptions in description_txt column.
    Pleasech check :
    https://forums.oracle.com/thread/2596075
    https://forums.oracle.com/message/10601105#10601105
    SELECT T."NUMBER",
        T.opened_by,
        T.assignee_name,
        T.closed_by,
        listagg(T.type,',') within GROUP(ORDER BY T.type) actions,
        listagg(T.description_txt,',') within GROUP (ORDER BY T.description_txt) descs
    FROM
      (SELECT
        ps."NUMBER",
        ps.opened_by,
        ps.assignee_name,
        ps.closed_by,att.type, att.description_txt
      FROM tableps ps LEFT JOIN activity_txt att ON ps."NUMBER" = att."NUMBER" AND att.type  IN('Assignment','Reassignment')
      WHERE open_time BETWEEN to_date('01-OCT-2012','DD-MON-YYYY') AND to_date('31-OCT-2013','DD-MON-YYYY')
        AND ((ps.opened_by   =ps.closed_by)
        AND (ps.closed_by    =ps.assignee_name)
        AND (ps.assignee_name=ps.opened_by))
         and (att.type NOT LIKE '%Reass%' OR att.type IS NULL)
         AND (att.description_txt LIKE ('%NONE to '|| opened_by ||'%') OR att.description_txt IS NULL)
         AND (att.description_txt NOT LIKE '%,%'OR att.description_txt IS NULL)) T
    Group by T."NUMBER",
        T.opened_by,
        T.assignee_name,
        T.closed_by
    And carefully read Solomon Yakobson's and Frank Kulash's replies.
    Regards
    Mahir M. Quluzade

  • Removing the Duplicate Values from output without using Keyword DISTINCT

    Hi,
    I'm running the below query without DISTINCT Keyword and getting Duplicate results. can you please tell me what needs to be done if I want unique values without using Distinct.
    select hra.Location_code
    ,hra.Description
    ,hra.Address_line_1
    ,hra.Address_line_2
    ,hra.Address_line_3
    ,hra.town_or_city
    ,hra.Region_1
    ,hra.Postal_Code
    ,hra.country
    ,hra.attribute1
    ,hra.attribute5
    ,hra.attribute6
    ,hra.attribute8
    ,hra.attribute9
    ,hra.attribute2
    ,hra.attribute3
    ,hra.attribute4
    ,hra.attribute7
    ,hra.attribute10
    from hr_locations_all hra
    ,per_all_people_f papf
    ,per_person_types ppt
    , per_person_type_usages_f pptuf
    ,hr_all_organization_units haou
    ,hr_all_organization_units haou1
    where 1=1
    and hra.business_group_id = papf.business_group_id
    and hra.business_group_id = ppt.business_group_id
    and pptuf.person_id = papf.person_id
    and pptuf.person_type_id = ppt.person_type_id
    and ppt.system_person_type = 'EMP'
    and ((hra.inactive_date is null) or (trunc(hra.inactive_date)>= to_date('01/01/2012','mm/dd/yyyy')))
    and to_date('01/01/2012','mm/dd/yyyy') between trunc(pptuf.effective_start_date) and trunc(pptuf.effective_end_date)
    and((papf.effective_end_date is null) or (trunc(papf.effective_end_date)>= to_date('01/01/2012','mm/dd/yyyy')))
    and ((haou1.date_to is null) or (trunc(haou1.date_to)>= to_date('01/01/2012','mm/dd/yyyy')))
    and papf.business_group_id = haou.organization_id
    and hra.location_id = haou1.location_id;

    Hi,
    Try using this Code
    select hra.Location_code
    ,hra.Description
    ,hra.Address_line_1
    ,hra.Address_line_2
    ,hra.Address_line_3
    ,hra.town_or_city
    ,hra.Region_1
    ,hra.Postal_Code
    ,hra.country
    ,hra.attribute1
    ,hra.attribute5
    ,hra.attribute6
    ,hra.attribute8
    ,hra.attribute9
    ,hra.attribute2
    ,hra.attribute3
    ,hra.attribute4
    ,hra.attribute7
    ,hra.attribute10
    from hr_locations_all hra
    ,per_all_people_f papf,
    per_all_assignments_f paaf,
    per_person_types ppt
    , per_person_type_usages_f pptuf
    ,hr_all_organization_units haou
    --,hr_all_organization_units haou1
    where 1=1
    and
    hra.business_group_id = papf.business_group_id
    and hra.business_group_id = ppt.business_group_id
    and pptuf.person_id = papf.person_id
    and papf.person_id=paaf.person_id
    and pptuf.person_type_id = ppt.person_type_id
    and ppt.system_person_type = 'EMP'
    --and ((hra.inactive_date is null) or (trunc(hra.inactive_date)>= to_date('01/01/2012','mm/dd/yyyy')))
    and to_date('01/01/2012','mm/dd/yyyy') between trunc(pptuf.effective_start_date) and trunc(pptuf.effective_end_date)
    --and((papf.effective_end_date is null) or (trunc(papf.effective_end_date)>= to_date('01/01/2012','mm/dd/yyyy')))
    --and((paaf.effective_end_date is null) or (trunc(paaf.effective_end_date)>= to_date('01/01/2012','mm/dd/yyyy')))
    and to_date('01/01/2012','mm/dd/yyyy') between trunc(papf.effective_start_date) and trunc(papf.effective_end_date)
    and to_date('01/01/2012','mm/dd/yyyy') between trunc(paaf.effective_start_date) and trunc(paaf.effective_end_date)
    --and ((haou1.date_to is null) or (trunc(haou1.date_to)>= to_date('01/01/2012','mm/dd/yyyy')))
    --and papf.business_group_id = haou.organization_id
    and paaf.location_id=hra.location_id
    and paaf.organization_id=haou.organization_id
    --and papf.employee_number='1010008830'
    and hra.location_id = haou.location_id;

  • How to get distinct values from a list and display in a ListView webpart.

    Hi,
    I have a requirement in which I need to pull unique/distinct values from a custom list and then display it via a listview webpart. Can any one suggest how this can be done.
    If possible please share the CAMEL query to fetch distinct values from a custom list.
    Thanks,
    Ankit

    Hi Ankit,
    Is there any particular reason that the values need to be shown in a list view web part?  Are you going to use that web part for filtering via web part connections?
    I ask because the enterprise site collection features include the SharePoint List Filter web part, which may accomplish what you're looking for.
    If you just need to display the values in a grid view, you might have more luck with the JavaScript Client Object Model.  Try putting the following in a text file:
    <style>
    .CustomTableClass{display:table;table-layout:fixed}
    .CustomRowClass{display:table-row;}
    </style>
    <div id="distinct_values_div" class="CustomTableClass">
    <img src="/_layouts/loading.gif" />
    </div>
    <script language="JavaScript" type="text/JavaScript">
    var siteUrl = '/sitecollection/web'; //use the actual subsite URL here
    var listName = 'mylist'; // use the actual list name here
    var field = "Title" // use the actual field you want to display here
    var divToUpdate = document.getElementById("distinct_values_div");
    var rowClass = "CustomRowClass";
    ExecuteOrDelayUntilScriptLoaded(function(){
    var clientContext = new SP.ClientContext(siteUrl);
    var web = clientContext.get_web();
    var lists = web.get_lists();
    var list = lists.getByTitle(listName);
    var camlQuery = new SP.CamlQuery();
    camlQuery.set_viewXml('<View><Query></Query><RowLimit>500</RowLimit></View>');
    this.collListItem = list.getItems(camlQuery);
    clientContext.load(collListItem,"Include ("+field+")");
    clientContext.executeQueryAsync(
    Function.createDelegate(this, this.onQuerySucceeded),
    Function.createDelegate(this, this.onQueryFailed));
    },"sp.js");
    function onQueryFailed(sender, args){
    divToUpdate.innerHTML = 'Unable to retrieve values: '+args.get_message());
    function onQuerySucceeded(sender, args){
    var allValues = [];
    var listItemEnumerator = collListItem.getEnumerator();
    divToUpdate.innerHTML = "";
    while(listItemEnumerator.moveNext()){
    var listItem = listItemEnumerator.get_current();
    if(!containsString(allValues,listItem.get_item(field)){
    var value = listItem.get_item(field);
    allValues.push(value);
    var newDiv = document.createElement("div");
    newDiv.className = rowClass;
    newDiv.innerHTML = value;
    divToUpdate.appendChild(newDiv);
    function containsString(strArray, text){
    var contains = false;
    for (var i=0; i<strArray.length; i++){
    if(strArray[i]==text){contains = true; break;}
    return contains;
    </script>
    Upload the text file to a library on the site, then add a content editor web part to a page where you want the distinct values to appear. In the content editor web part's properties, edit the Content Link so that it links directly to the text file.  This
    will cause the JavaScript to run on the page.

  • Get distinct values from a coma seperated string variable

    Hi ,
    I am getting an comma seperated string as in parameter, now i want to get the distinct values from that string and will use those values to pass it to a query.
    any help

    try this:
    sorry about the messiness - it's just quickly copied from some badly formatted code....
    TYPE T_FieldArray IS TABLE OF varchar2(255) INDEX BY BINARY_INTEGER;
    function SPLIT_CSV_FIELDS (
    p_Input_Str in varchar2,
    p_Delimiter in varchar2,
    p_Quote_Char in varchar2)
    return t_fieldarray is
    v_FieldArray T_FieldArray;
    v_input_str varchar2(4000);
    v_field_str varchar2(255);
    v_pos number;
    e number := 0;
    v_delim_str varchar2(3);
    cur_pos number;
    begin
    loop
    -- find each delimiter char in string
    v_pos := INSTR(v_input_str, p_Delimiter);
    -- each time delimiter char is found
    if v_pos > 0 then
    -- current field value is current string to position prior to delimiter char
    v_field_str := UPPER(SUBSTR(v_input_str, 1, v_pos - 1));
    -- remove quote char from end of field (if any)
    v_field_str := TRIM(TRANSLATE(v_field_str, NVL(p_Quote_Char, p_Delimiter), ' '));
    -- increment element number
    e := e + 1;
    -- get remainder of input string to check
    v_input_str := SUBSTR(v_input_str, v_pos + 1, LENGTH(v_input_str) - v_pos);
    v_FieldArray(e) := v_field_str;
    else
    -- increment element number
    e := e + 1;
    -- last field value is what's left of input string less quote char (if any)
    v_field_str := TRIM(TRANSLATE(UPPER(v_input_str), NVL(p_Quote_Char, p_Delimiter), ' '));
    v_FieldArray(e) := v_field_str;
    exit;
    end if;
    end loop;
    return v_FieldArray;
    end;

  • "How to get distinct values of sharepoint column using SSRS"

    Hi,
        I have integrated sharepoint list data to SQL Server reporting services. I am using the below to query sharepoint list data using sql reporting services.
    <Query>
       <SoapAction>http://schemas.microsoft.com/sharepoint/soap/GetListItems</SoapAction>
       <Method Namespace="http://schemas.microsoft.com/sharepoint/soap/" Name="GetListItems">
          <Parameters>
             <Parameter Name="listName">
                <DefaultValue>{GUID of list}</DefaultValue>
             </Parameter>
             <Parameter Name="viewName">
                <DefaultValue>{GUID of listview}</DefaultValue>
             </Parameter>
             <Parameter Name="rowLimit">
                <DefaultValue>9999</DefaultValue>
             </Parameter>           
          </Parameters>
       </Method>  
    <ElementPath IgnoreNamespaces="True">*</ElementPath>
    </Query>
    By using this query, I am getting a dataset which includes all the columns of sharepoint list. Among these columns, I wanted to display only 2 columns (i.e Region and Sales type) using chart. I have created a Region parameter but when I click preview, the drop down box is giving me all the repeatative values of region like RG1,RG1,RG1,RG2,RG2,RG2,RG2,RG3.......... I wanted to display only distinct values of Region parameter so that whenever end user select region from the parameter drop down, it will display the respective value of Sales type column.
    Also when I select only RG1 parameter, it is giving me a chart including the sales type of all the Regions. (it should display me only the sales type of RG1) How can I link these 2 columns so that they will display the values respectively.
              I would really appreciate if anyone can help me out with this.
    Thanks,
    Sam.

    Hi Sam,
    By code, the CAML language doesn’t have any reserved word (or tag) to set this particular filter to remove duplicate results.
    In this case, we could use the custom code to get distinct records.
    Here are the detailed steps:
    1.         Create a hidden parameter that gets all the records in one field.
    Note: Please create another dataset that is same of the main dataset. This dataset is used for the parameter.
    2.         Create a function that used to remove the duplicate records.
    Here is the code:
    Public Shared Function RemoveDups(ByVal items As String) As String
    Dim noDups As New System.Collections.ArrayList()
    Dim SpStr
    SpStr = Split(items ,",")
    For i As Integer=0 To Ubound(Spstr)
    If Not noDups.Contains(SpStr(i).Trim()) Then
    noDups.Add(SpStr(i).Trim())
    End If
    Next
    Dim uniqueItems As String() = New String(noDups.Count-1){}
    noDups.CopyTo(uniqueItems)
    Return String.Join(",", uniqueItems)
    End Function
    3.         Create another parameter that will be used for filtering the maindata.
    Please set the available value to be =Split(Code.RemoveDups(JOIN(Parameters!ISSUE_STATUS_TEMP.Value, ",")), ",")
    And the default value to be the value you what such as the first value:
    =Split(Code.RemoveDups(JOIN(Parameters!ISSUE_STATUS_TEMP.Value, ",")), ",").(0)
    4.         Go to the main dataset. Open the property window of this dataset.
    5.         In the “Filters” tab, set the filter to be:
    Expression: <The field to be filter>
    Operator: =
    Value: =Parameters!Region.Value
    The parameter “Region” should be the parameter we created in the step3.
    Now, we should get distinct values of SharePoint columns.
    If there is anything unclear, please feel free to ask.
    Thanks,
    Jin
    Jin Chen - MSFT

  • Get distinct values from plsql array

    Hi,
    I have declared a variable as below in plsql proc.
    type t_itemid is table of varchar2(10);
    inserted set of items in to this using a program
    now i want distinct values from that array how can i get it.

    I am using 9i so i cannot use set operator and more over my problem is that i am declaring the variable inside the plsql block . when i tried i am getting the below errors:
    SQL> r
    1 declare
    2 type t_type is table of varchar2(10);
    3 v_type t_type;
    4 begin
    5 v_type := t_type('toys','story','good','good','toys','story','dupe','dupe');
    6 for i in (select column_value from table(v_type)) loop
    7 dbms_output.put_line(i.column_value);
    8 end loop;
    9* end;
    for i in (select column_value from table(v_type)) loop
    ERROR at line 6:
    ORA-06550: line 6, column 41:
    PLS-00642: local collection types not allowed in SQL statements
    ORA-06550: line 6, column 35:
    PL/SQL: ORA-22905: cannot access rows from a non-nested table item
    ORA-06550: line 6, column 10:
    PL/SQL: SQL Statement ignored
    ORA-06550: line 7, column 22:
    PLS-00364: loop index variable 'I' use is invalid
    ORA-06550: line 7, column 1:
    PL/SQL: Statement ignored

  • CE function to get distinct values from Column table

    Hi All,
    Could you please let me know the appropriate CE function to get the distinct values from column table.
    IT_WORK = SELECT DISTINCT AUFNR FROM :IT_WO_DETAILS;
    Thank you.

    Hi,
    If you have 10g, you can use Model( with model performance is better than connect by )
    Solution
    ========================================================================
    WITH t AS
    (SELECT '0989.726332, 1234.567432, 3453.736379, 3453.736379, 0989.726332, 3453.736379, 1234.567432, 1234.567432, 0989.726332'
    txt
    FROM DUAL)
    SELECT DISTINCT TRIM(CHAINE)
    FROM T
    MODEL
    RETURN UPDATED ROWS
    DIMENSION BY (0 POSITION)
    MEASURES (CAST( ' ' AS VARCHAR2(50)) AS CHAINE ,txt ,LENGTH(REGEXP_REPLACE(txt,'[^,]+',''))+1 NB_MOT)
    RULES
    (CHAINE[FOR POSITION FROM  1 TO NVL(NB_MOT[0],1) INCREMENT 1] =
    CASE WHEN NB_MOT[0] IS NULL THEN TXT[0] ELSE REGEXP_SUBSTR(txt[0],'[^,]+',1,CV(POSITION)) END );
    =========================================================================
    Demo
    =======================================================================
    SQL> WITH t AS
    2 (SELECT '0989.726332, 1234.567432, 3453.736379, 3453.736379, 0989.726332, 3453.736379, 123
    4.567432, 1234.567432, 0989.726332'
    3 txt
    4 FROM DUAL)
    5 SELECT DISTINCT TRIM(CHAINE)
    6 FROM T
    7 MODEL
    8 RETURN UPDATED ROWS
    9 DIMENSION BY (0 POSITION)
    10 MEASURES (CAST( ' ' AS VARCHAR2(50)) AS CHAINE ,txt ,LENGTH(REGEXP_REPLACE(txt,'[^,]+',''))+1 NB_MOT)
    11 RULES
    12 (CHAINE[FOR POSITION FROM  1 TO NVL(NB_MOT[0],1) INCREMENT 1] =
    13 CASE WHEN NB_MOT[0] IS NULL THEN TXT[0] ELSE REGEXP_SUBSTR(txt[0],'[^,]+',1,CV(POSITION)) END );
    TRIM(CHAINE)
    3453.736379
    1234.567432
    0989.726332
    SQL>
    ========================================================================

  • How to get Distinct Values from Answers

    Hi,
    How to get Distinct values from answers, i've tried to put some functions on it.
    Thanks,
    Malli

    Malli,
    Are you trying to fetch data from Dimension Attr OR Fact Measures? Did you try the advance tab - > Advanced SQL Clauses - > Check this box to issue an explicit Select Distinct.

  • Distinct values from dynamic internal tabls

    Hi All,
    I have a dynamic internal tables like <dy_table> , i want to get distinct  values from this internal tables,
    how to do that, structure of dynamic internal tables is dynamic acc. to user conditions.
    regards,
    Anuj

    Hi Anuj
    Just try this,
    CALL METHOD cl_alv_table_create=>create_dynamic_table
    EXPORTING
    it_fieldcatalog = tb_fields_for_it
    IMPORTING
    ep_table = gp_dyn_table.
    ASSIGN gp_dyn_table->* TO <gt_table>.
    ASSIGN LOCAL COPY OF INITIAL LINE OF <gt_table> TO <fs_table>.
    LOOP AT tb_output.
    *To assign value for serial number.
    ASSIGN COMPONENT 1 OF STRUCTURE <fs_table> TO <ls_field>.
    <ls_field> = tb_output-sno.
    UNASSIGN <ls_field>.
    *To assign value for Sales Organization.
    ASSIGN COMPONENT 2 OF STRUCTURE <fs_table> TO <ls_field>.
    <ls_field> = tb_output-vkorg.
    UNASSIGN <ls_field>.
    *To assign Rate for its respective Condition type.
    LOOP AT tb_konp WHERE knumh = tb_output-knumh.
    READ TABLE tb_fieldcat1 WITH KEY fieldname = tb_output-kschl.
    IF sy-subrc EQ 0.
    lv_count = tb_fieldcat1-col_pos.
    ASSIGN COMPONENT lv_count OF STRUCTURE <fs_table> TO <ls_field>.
    IF tb_konp-konwa EQ '%'.
    tb_konp-kbetr = tb_konp-kbetr / co_10.
    <ls_field> = tb_konp-kbetr.
    ELSE.
    <ls_field> = tb_konp-kbetr.
    ENDIF.
    ENDIF.
    ENDLOOP.
    lv_count = lv_count + 1.
    APPEND <fs_table> TO <gt_table>.
    CLEAR <fs_table>.
    ENDLOOP.
    Hope this proves helpful to you.

  • Distinct count of GRN's in Query PLD

    hi all,
    We have developed a daily grn report and designed report
    using  Query PLD.
    Report contains
    (grn no,date,vendor name,vendor ref no,item code,item
    description,quanity & line total)
    We want to display no of grn's(distinct count)
    @ repetitive area footer.
    Is there any function available in formula field to display
    distinct count of no. of grn's ? / It should done thru query.
    Thanks,
    with regards,
    A.Jeyakanthan

    it will be hard from PLD, instead u can have ur query like,
    SELECT 'Details', '   ',T0.Docnum, T0.CardName, .... FROM OPDN T0 WHERE Month( T0.DocDate ) = Month ('{%0]')
    Union
    SELECT 'Counts', count(T0.DocNum) as 'Doc(s) No', ' ', ' ', ... FROM OPDN T0 WHERE Month( T0.DocDate ) = Month ('{%0]')
    (Replace { with [ )
    Note ' ' is a gap in order to fill the other fields. in first query have given tht '  ' gap purposely so tht the display will not affect ur designing part
    union is used b'coz Count() fn is like aggregate, so wont allow further individual fields coming along with it.
    the 2nd query will occupy only one row, which by grouping u can separate and can hide from repetitive and take the value via formula field by writing that field's id to it into Footer Area.
    Regards,
    Dhana.
    Edited by: Dhanalakshmi C on Mar 5, 2008 1:31 PM

  • Use of distinct in main query

    Hi All,
    I am creating a report based on two tables Invoice Header and Invoice Line. These two table have the following fields in relation :
    Invoice_Dept|| Invoice_Pfx||Invoice_No
    My question is whether I can use distinct in the main query for this. Coz, when I don't I get repeated records as one Invoice header can have multiple line items in the Invoice Line tables.
    Please suggest.
    Thanks

    Hi Omer Farooq,
    Firstly you can use Distinct in main query.
    Secondly I feel you need to use Groups in the data model rather then using distinct.
    If you will create groups then your first that is top group will contain fields related to Invoice Header
    and second group will contain Invoice Line fields.
    Hope this helps.
    If this does not help please post your query and what output you want on the report.
    Best Regards
    Arif Khadas

  • Report using Tabular Model and Measures based on Distinct Counts

    Hello,
    I am creating a report that should present something like this:
    YEAR-1 | MONTH-1 | MONTH-2 | MONTH-3... | YEAR | MONTH-1 | MONTH-2 | MONTH-3...
    My problem is that when designing the dataset to support this layout I drag the Year, Month and Distinct count Measure, but on the report when I want the value for the YEAR level I don't have it and I cannot sum the months value...
    What is the best aproach to solve this? Do I really have to go to advanced mode and customize my MDX or DAX? Can't basic users do something like this that seems so trivial and needed?
    Thank you
    Luis Simões

    Hi Luis,
    According to your description, you create a Reporting Services report using Analysis Service Tabular Model as the datasource, now what you want is sum the months value on year level, right?
    In your scenario, you can add the Month field to column group, add a parent group using Year Field and then add a Total on Month group. In this case, Reporting Services will sum the months value on Year level. I have tested it on my local environment, the
    screenshot below is for you reference.
    Reference:Lesson 6: Adding Grouping and Totals (Reporting Services)
    If this is not what you want, please describe your dataset structure, so that we can make further analysis.
    Regards,
    Charlie Liao
    TechNet Community Support

  • Need distinct rows in BO XiR3 Webi report

    I have a report which is similar to below example. Report has multiple other columns like Issue owner, created date, target date etc which are different (means data doesnt repeat in any row and all are dimensions)
    1. User wants one single row for each ID. How to achieve this in BO Webi XiR3?
    ID
    Issue
    Severity
    1
    1.1
    High
    1
    1.2
    High
    2
    2.1
    High
    2
    2.2
    Medium
    2
    2.3
    Low
    3
    3.1
    High
    3
    3.2
    Medium
    3
    3.3
    Medium
    2. Above table is a detail tab. There is also summary tab which is as below. Requirement is that Count for High, Medium and Low in Summar tab should match with the count in detail tab and also should match with the row count in detail tab. This means only when ID column is unique, it will match with row count
    Original Target Dt
    Current Target Date
    Primary Owner
    High
    Medium
    Low
    Total
    1-Jan
    15-Jan
    A
    4
    3
    7
    14
    30-Jan
    14-Feb
    B
    6
    2
    0
    8
    24-Feb
    17-Mar
    C
    5
    6
    7
    18
    Total:
    15
    11
    14
    40
    Please help me to achieve the above target in BO report

    1)
    Please Check Universe Parameter .
    It Should Be Distinct .
    If It is Distinct Then In Web Trim all objects using formula.
    If ID is your granular level it should bring unique row for it ,
    For Unique row your  [ID] should be granular level .But in your image [Issue] is granular level .
    So you can do one thing apply Group on ID & Show Sum of Your KPIs in footer
    with specific color code for group total row.
    2)
    in Summary part
    Create Crosstab
    [Sevirity]
    Total
    [Original Target Dt]
    [Current Target]
    [Primary Date]
    { Count([ID / Issue] ) }
    Sum(use  Count)

Maybe you are looking for

  • BW System QBW: Result too large

    Hi Everyone, when i am running webi report its giving error. we are using BO : 4.0 with conncetion. BW System QBW: Result too large (917 070 cells); data collection is limited by configuration (maximum - 500000 cells) (WIS 00000) Pls give me any solu

  • Looking to create delivery with multiple batch line items

    Hi,    Can you please suggest me BAPI / FM to create a delivery with multiple batches. like ... i have 1 mail line item in the delivery and n sub line items. If possible can you please post req parameters too. Thanks in advance.

  • Widescreen being forced to 4:3

    I'm having an issue with a quicktime video that i import being forced from widescreen into a 4:3 ratio. I end up with black bands down the sides. is their a way within FCE to force a video clip to widescreen? thanks.

  • Missing .xml file and ratings...

    Hello, I moved my itunes collection to another sdd disk, but forgot to consolidate, now i have lost my ratings. Ithought i could get the .xml file back on my timecapsule back up so was not too worried, only to realise that TC doesnt keep the .XML fil

  • Loud Fan in Macbook Pro

    My Mac has been very slow intermitatley since I bought it - such as glitches in the login screen.. not able to log on for ages.  The fan also very loud, nearly sounds like its loose.