Query Designer - How to compare 2 non-numeric characteristics?

Hi,
In a BW query, I would like to display all materials sold for which the country of the sold-to is different of the country of the ship-to.
Both of these characteristics (countries) are available in the cube like navigation attributes. I cannot modify the modeling of the infocube.
Do you have a solution to solve my problem?
Thanks in advance for your help.
Samuel
PS: I work in BI7
Edited by: Samuel ROBELET on Jun 15, 2010 1:57 PM

Hi
Here my list of records in the infocube:
material  |country of sold-to|country of ship-to|KF1|KF2
material1|                       FR |                        FR |KF11|KF12
material2|                       US |                       US |KF21|KF22
material3|                       FR |                       BE |KF31|KF32
material4|                       PT |                        FR |KF41|KF42
Expected result:
material  |country of sold-to|country of ship-to|KF1|KF2
material1|                       FR |                        FR |KF11|KF12
material2|                       US |                       US KF21|KF22|
material3|                       FR |                       BE |KF31|KF32
material4|                       PT |                        FR |KF41|KF42
Samuel
Edited by: Samuel ROBELET on Jun 15, 2010 3:08 PM
Edited by: Samuel ROBELET on Jun 15, 2010 3:08 PM

Similar Messages

  • Compare non numeric data using arithmetic operations

    Hi
    Is there anyway to compare the non numeric data in a table to a numeric number.
    Want to run a query like
    SELECT rank_id
                                          FROM   mas_rank
                                          WHERE  rank_code > 26 Rank_code contains numeric as well as some non numeric data
    Thanx for the help

    Yes, it will work if you just say > '26' See this demo :
    SQL> create table mas_rank(rank_id number,rank_code varchar2(2));
    Table created.
    SQL> insert into mas_rank values (100,'aa');
    1 row created.
    SQL> insert into mas_rank values (101,'ab');
    1 row created.
    SQL> insert into mas_rank values (102,'ad');
    1 row created.
    SQL> insert into mas_rank values (103,'ag');
    1 row created.
    SQL> insert into mas_rank values (104,'ac');
    1 row created.
    SQL> insert into mas_rank values (105,'22');
    1 row created.
    SQL> insert into mas_rank values (106,'25');
    1 row created.
    SQL> insert into mas_rank values (107,'26');
    1 row created.
    SQL> insert into mas_rank values (108,'27');
    1 row created.
    SQL> insert into mas_rank values (109,'aa');
    1 row created.
    SQL> insert into mas_rank values (110,'28');
    1 row created.
    SQL> SELECT rank_id
      2                                        FROM   mas_rank
      3                                        WHERE  rank_code not in ('ab','ad','ag')
      4                                                 and rank_code > 26;
                                                   and rank_code > 26
    ERROR at line 4:
    ORA-01722: invalid number
    SQL> ed
    Wrote file afiedt.buf
      1  SELECT rank_id
      2                                        FROM   mas_rank
      3                                        WHERE  rank_code not in ('ab','ad','ag')
      4*                                                and rank_code > '26'
    SQL> /
       RANK_ID
           100
           104
           108
           109
           110
    SQL>Regards
    Girish Sharma

  • Query Designer: how to keep all char. in one vertical column when running?

    In query designer, if dragging char. one by one from the left to the row section, when running the query, these row characteristics all show in different columns.  How to show them in one column?  Just give you an example, usually the query result format would like the following:
    Salesman--Sales Office-Sales Org----Quantity
    John--Office1Org1--
    50
    Mark--Office2Org2--
    100
    Kevin--Office3Org3--
    30
    Now, we would like the query result looks like the following format:
    Salesman------Quantity
    John----
    50
    Mark----
    100
    Kevin----
    30
    Salesman Total------180
    Sales Office------Quantity
    Office1----
    xx
    Office2----
    xx
    Office3----
    xx
    Sales Office Total------xx
    Sales Org-------Quantity
    Org1----
    xx
    Org2----
    xx
    Org3----
    xx
    Sales Org Total------xx
    How to generate the above query?
    Thanks and we will give you reward points!

    Hi,
    What you want to do is 3 different views of the same report
    If you publish the information in Excel (workbook) you have to call 3 times the query in three different sheets, and manually do a summary....
    If you publish in the web, then you can have 3 times the same query but with different views on the same page. you can then control the three tables with the same navigation block...
    But your request is not the way Bex works...
    PYG

  • BW 3.5, BEx Query designer issue with text of the characteristics

    Hi All,
    We are currently using BEx 3.5 Query Designer to design the queries. We have one of the ODS on which we are querying for.
    We have 3 different types of Customer in this ODS. 0Customer, 0BBP_CUSTOMER and 0GN_CUSTOMER. The problem is when we open this ODS in Query designer we see their text name on the left hand side column where it shows data fields as the same text name Customer.
    Now the our Power users have raised the issue that it is very confusing even when there are 3 different technical names for these characteristics.
    2 Questions I have.
    1) Why is something like this happening? is it some issue with the Patch or something. We will be migrating to new BI soon but in the mean time if I could resolve it that will be the best. Or does it even get resolved with new BI???
    2) what is the way in which we can resolve it?
    Thanks in advance and points will be given generously.

    HI BI Consul!
    Things like this happen, when it is called customer it could be different customers, 0customer is the standard R/3 customer and 0BBP_customer is objects from CRM and most likely 0GN_Customer might be customer from different system.
    Sure, power users should be told which customer is customer and you could also change the discription of the object, to match the definition on the other system. You could also just create z object and replace the existing confusing object with something meaningful to users.
    thanks.
    Wond

  • How to check non-numeric value in a field

    Hi all,
    I have a field 'MVALUE'. HOw can I check if I have a non-numeric value in my field. Let us say if I have a value '<25' in this field. How can I check if the value in this field is non-numeric. The field MVALUE is of CHAR datatype.
    Please help. Waiting.........

    Might have to add a space in the string...
    if not mvalue co ' 0123456789'.
    * error
    endif.
    if you allow decimals and commas...
    if not mvalue co ' .,0123456789'.
    * error
    endif.

  • PL/SQL Function Returning Query Error / ORA-01858: a non-numeric char.....

    I'm trying to write a PL/SQL function to dynamically return a query with varying # of columns. I've done this type of thing before wiith much success, however this is the first time I'm using a cursor for loop within a function to accomplish my task.
    here is the error I get:
    ORA-01858: a non-numeric character was found where a numeric was expected
    Error ERR-1101 Unable to process function body returning query.
    Mind you I have tested the PL/SQL from a SQL editor and it works fine. I'm confused.
    Code is below.
    Thanks in advance!
    DECLARE
    my_query varchar2(4000);
    string1 varchar2(50) := 'select city, ';
    string2 varchar2(4000) := '' ;
    string3 varchar2(4000):= 'from
    ( select a.title, a.city, a.start_date, sum(a.total_stu) cnt
    from sj_class_summary3 a
    group by a.title, a.city, a.start_date
    having a.title = :P4_COURSE )
    group by title, city';
    TYPE date_tab_type IS TABLE OF date INDEX BY PLS_INTEGER;
    date_tbl date_tab_type;
    i number;
    BEGIN
    i:=1;
    for myrec in (select distinct start_date from sj_class_summary3
    where start_date between :P4_START_DATE and :P4_END_DATE order by 1) loop
    date_tbl(i) := myrec.start_date;
    string2 := string2 || ' max( decode( start_date, ''' || date_tbl(i) || ''', cnt,0) ) "' || date_tbl(i) || '", ';
    i := i+ 1;
    end loop;
    string2 := SUBSTR(string2,1,LENGTH(string2)-2);
    string2 := string2 || ' ';
    my_query := string1 || string2 || string3;
    return my_query;
    END;

    Hi Bob,
    you also have another date to character to date conversion in:
    decode( start_date, ''' || date_tbl(i) || ''', cnt,0)
    does this need to be:
    decode( start_date, to_date(''' || to_char(date_tbl(i), 'dd/mm/yyyy') || ''', ''dd/mm/yyyy''), cnt,0)
    Regards
    Michael

  • Query Designer - how to count distinct  characteristic values in a column

    Hello Experts,
    I need to count the number of distinct occurences in a column and use it later for a percentage calculation. I'll give you a concrete example:
    Promotion_ID   Product    Promoted
    A  ******************  P1 ********  1
    A  ******************  P2 ********  0
    A  ******************  P3 ********  1
    B  ******************  P1 ********  0
    B  ******************  P3 ********  1
    C
    D
    A promotion ID can have more than 1 product associated with it. A product can be promoted (1) or not. A promotion_ID can be also empty (no products C and D)
    I need to calculate for each product the percentage of promotions where the product is promoted out of ALL promotions (4) or
    P1  25 %
    P2  0 %
    P3  50%
    How can I model this in the Query Designer ? How can I count the distinct Promotion_IDs ?
    Any ideas will be appreciated.
    Thanks
    Rado

    Hi,
    Please take a look at the docs below.
    https://websmp102.sap-ag.de/~sapdownload/011000358700002762432003E/HowToCount.pdf
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/7e58e690-0201-0010-fd85-a2f29a41c7af
    Regards,
    ®

  • How to compare two different characteristics at the same time in polestar

    Hi Gurus,
    I would like to analyse the e fashion universe in polestar with comparison of previous year product line with current year product line at the same time.
    is there any way to do that we can compare two years of the product line sales revenue at the same time with comparison chart like 2003 T shirts vs 2002 T shirts 
    in polestar we can compare the two measures at the same time but i want to compare the sales revenue of product lines of two years in a comparison chart at the same time.
    Regards and thanks
    Abid Paul

    Hi Stratos,
    I am actually able to compare the Measures  but i want the comparison between the two different characteristics like this year  productline  vs last year productline at the same time with say one measure like sales revenue or any other.
    Is it possible to compare the both and it should represent in the chart as well at the same time.
    In the polestar i can compare three measures at the same time but i want to compare characteristics like year  2009 productline VS 2008 productline with one measure say sales revenue.
    I would really appreciate if you could help me out.
    Regards and thanks
    Abid

  • Trying to create non-numeric key figure in Query

    Hello, I am trying to add a formula into my BW Query that will return a non-numeric value.
    My cube will be used like a standard BW cube 90% of the time, but there is one query request that wants to display atomic data and have non-numeric categories determine at time of query run.
    Example:
    Field A has integer values
    Key           Value
    Record 1     -1
    Record 2      2
    Record 3      6
    I want to add a calculated field with the following logic:
    If Value is <= -1 then display "Early" else if Value is >-1 and <=5 then display "On-Time" else if Value is > 5 then display "Late".  The -1 and 5 values will be replaced with variables that will be required on the selection screen.
    This would return a grid as below:
    Key           Value    Calculated Field
    Record 1     -1           "Early"
    Record 2      2           "On-Time"
    Record 3      6           "Late"
    I haven't been able to figure out how to set up this field.  Any ideas?

    Hi,
    check these help links
    http://help.sap.com/saphelp_nw04/helpdata/en/8f/da1640dc88e769e10000000a155106/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/95/1ae03b591a9c7ce10000000a11402f/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/80/1a6305e07211d2acb80000e829fbfe/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/80/1a6312e07211d2acb80000e829fbfe/content.htm
    It's a big topic so it's not possible to write everything here.
    You can search the forums also.
    Thanks

  • How to search in BI 7.1 query designer for the required key figures & chars

    Hi All,
         Can anyone plz tell me how to search in BI 7.1 query designer for the required key figures & characteristics. I have the query being built on a multiprovider which has many cubes.
    So, i have a huge list of key figures and characteristics. I am not able to search for the required one by the name or the technical name.
    How can we search and pick the required object from the enormous list of the Mutliprovider in the Bex Query Designer??
    Thanks
    Phani

    There is not a search feature available. You have to do an educated guess under what dimension your infoobject could be and select.

  • Select only non-numeric characters

    A
    $
    ^
    (78^*)5$#7
    )!@#$0-99
    _454*(&--0
    +@#$%564
    =123
    How select only non-numeric characters from above table?

    Nilesh Hole,Pune, India wrote:
    but i want a uniqe query.
    suppose table have n number of rows then how i will wirte a query.Not sure what you mean? Do you want to select a list of distinct non-numeric characters used in your table? Then:
    column "Distinct non-numeric chars" format a30
    with t as (
               select '!' a from dual union all
               select '@' from dual union all
               select '#' from dual union all
               select '$' from dual union all
               select '%' from dual union all
               select '^' from dual union all
               select '&' from dual union all
               select '*' from dual union all
               select '(78^*)5$#7' from dual union all
               select ')!@#$0-99' from dual union all
               select '_454*(&--0' from dual union all
               select '+@#$%564' from dual union all
               select '=123' from dual union all
               select '135790' from dual
    select  distinct substr(a,column_value,1) "Distinct non-numeric chars"
      from  (
             select  regexp_replace(a,'[[:digit:]]') a
               from  t
               where not regexp_like(a, '^[[:digit:]]+$')
            table(
                  cast(
                       multiset(
                                select  level
                                  from  dual
                                  connect by level <= length(a)
                       as sys.odcinumberlist
    Distinct non-numeric chars
    +
    =
    $
    Distinct non-numeric chars
    ^
    14 rows selected.
    SQL> SY.

  • Reflecting cube in query designer

    hi
    can any body tell me that i have created one cube and that cube which i have created that i want should also reflect in my query designer how should i make it reflect in query designer
    regards
    gurkiran

    Hi,
    For creation of query on cube please follow the following path
    Start -> all Programs -> Business expolrer -> Query Designer
    it will ask for Login.
    after login query-> new -> find your cube and create report and save it.
    Regards,
    Ganesh

  • Filter certain InfoObject values in Query Designer

    Hi
    I've the following scenario:
    - InfoObject 0ACCOUNT contains some account numbers with prefix 'XYZ' followed by a number, e.g. 'XYZ12345'
    - These values may never be shown to the analysts, i.e. I need to filter (remove) them in the characteristic restrictions of the Query Designer
    How can I do that? Hard-coding all these values makes no sense as new account numbers could be created anytime.
    I think the only solution is using a customer exit or does someone have another idea?
    Thank you for you help
    Patrick

    Hi Patrick,
    Exclusion with multiple values generally hampers query performance, so better I would suggest you to include required values in filter if that is feasible (As I know there is some limit on number of filter value inclusion also).
    You can simply create a customer exit variable on 0ACCOUNT, select all the master data values of 0account in internal table and then delete the values starting with 'XYZ'.
    DELETE i_t_account where 0account CP 'XYZ'.
    after that you need to populate all these values in variable. I would suggest you to do this operation in I_STEP = 2, otherwise if you do it in step 1 then it might take some time for user to see the selection screen.
    Regards,
    Durgesh.

  • Query design question (NW04s)

    In query designer, how do I hide a column that has no data. I know how to suppress zero result columns, but these columns are not zero because they had no data.
    Can this be done using a local formula?

    Hi Raynald,
    Yes you can do this by restriction. I mean you restrict the report only display for the column that has a data.
    How you do this :
    1. Open your query.
    2. Right click for the characteristic (column), choose restrict.
    3. Choose for fix values, and singles value for selection type.
    4. (there will be 2 area) You restrict it by choose no-data / symbolized by # (move it from left to right pane).
    5. (After moving it to right pane) You right click to that symbol then choose exclude from selection in the context menu.
    If you have already made it, the column that has no data will be hidden.
    Hopefully it can help you.
    Regards,
    Niel.
    award points if it helps you.

  • How to display in query Designer in a query the characteristics values of an infoObject in one cell

    Hello Community Members,
    I have query with 3 characteristics and 2 key figures, and
    want to expand the key figures values only with 2 characteristics, and display the different values of the 3. characteristic in the first cell at the corner of the query cell:
              C31,C32             C21                       C22                      C23        
              C33, C34
               C11                  KF11    KF21           KF12    KF22      KF13    KF23
              C12                   KF14    KF24           KF15    KF25      KF16    KF26
              C13                   KF17    KF27           KF18    KF28      KF18    KF28
              C14
    How to set the characteristic C3 in query designer, so that their values will all be displayed in the cell in the corner.
    many thanks for helping
    Arnaud

    Hi Arnaud,
    Your query structure is not dependent on your aggregation level (I guess you are referring to the Exception aggregation or just the results and not AL in IP).
    Number of columns will depend on the combination of C2 and C3 in this case. So columns will not be 6 but 24.
    So I suggest you to create a work book based on two queries. One will just give you the values of C3. Use Macro to take its values and concatenate it and display in a new table along with the data of other query.
    This solution is not flexible as workbooks usually have some restrictions on Bex Features. But your requirement is also not simple.
    Regards,
    Sujit.

Maybe you are looking for

  • ITune not working, upgrade failed

    I am unable to upgrade to iTune 11.1 on my Mac (OS X Lion 10.7.5)  The upgrade downloads and runs for a long time with and it hangs when it gets to "Running Package Scripts"    After a time it then throws the following error message:  The update "iTu

  • Automatic Batch Creation at  the time of GR

    Hi all, I have configured automatic batch craetion in GR and same is working in Test client. And transfer the same to Quality but same is not working in quality. I have checked all IMG object for batch are in sync. and I am clue less now what to do?

  • Contact sheets in Bridge CS4

    I have been unable to make contact sheets in Adobe Bridge CS4. When I click on OUTPUT the field is empty. With Bridge CS3 this field had the refresh button and allowed customized contact sheets. What have I done wrong and how can I fix the problem? T

  • How can I determine which machines have activated Adobe Acrobat Standard 9?

    How can I determine which machines have activated Adobe Acrobat Standard 9?

  • Nokia PC Suite and Passworddragon Software

    I am running Windows 7 Pro with the latest updates. I was using Nokia PC Suite v3.8.48 when I got a notice of an available update to v7.1.60.0. I installed that update forgetting that I had a past conflict with a program called passworddragon. Passwo