Filtering using equality operator

I have the folloiwng MDX query:
 SELECT NON EMPTY { [Measures].[Gross Premium] } ON COLUMNS,
 NON EMPTY 
{ ([Date].[Quarter].[Quarter].ALLMEMBERS * 
[Prospect Client].[Account Number].[Account Number].ALLMEMBERS * 
[Broker].[Account Direct Broker Code].[Account Direct Broker Code].ALLMEMBERS * 
[Broker].[Account Direct Broker Code Previous].[Account Direct Broker Code Previous].ALLMEMBERS ) } 
ON ROWS 
FROM ( SELECT ( { [Prospect Client].[Account Number].&[02758] } )
ON COLUMNS FROM [Broker Premium]) 
it produces the following results:
What I want is to only show the records where the Account Direct Broker Code <> Account Direct Broker Code Previous, excluding blanks.  In the above case, i would only want to show the row for Qtr 2 - 2013.
thanks
Scott

Hi Scott ,
I am adding an example using the Filter and the NonEmpty functions to demonstrate a solution .
in my case I wanted to show only same first letter for product line and category without nulls .
Use the second code part instead lines 2-5 to achieve our goal .
SELECT NON EMPTY { [Measures].[Discount Amount] } ON COLUMNS,
NON EMPTY
{ ([Delivery Date].[Calendar Quarter of Year].[Calendar Quarter of Year] *
[Product].[Category].[Category]*[Product].[Product Line].[Product Line])}
ON ROWS
FROM ( SELECT ( { [Delivery Date].[Calendar Weeks].[Calendar Year].&[2008] } )
ON COLUMNS FROM [Adventure Works])
NonEmpty(Filter({ ([Delivery Date].[Calendar Quarter of Year].[Calendar Quarter of Year] *
[Product].[Category].[Category]*[Product].[Product Line].[Product Line])}
, left([Product].[Category].CurrentMember.name,1) = left([Product].[Product Line].CurrentMember.name,1) )
, [Measures].[Discount Amount]) ON ROWS
Hope it helps :)
Regards, David .

Similar Messages

  • InputListOfValue with ViewCriteria using between operator giving error.

    So i am using inputlistofvalues with ViewCriteria.In ViewCriteria i am using between operator for a date(CreDttm) field.
    when i click on search icon,it takes me to search popup and i give range of date and click search it give me result correctly and when i select a row and click ok,it take me to parent page but give error that "Credttm is required"...its Readonly Vo. If i use equal operator on same it works fine.
    Am i doing something wrong?
    Any help will be appreciated!
    Thanks

    its better to say which jdev version you are using..
    what is 'Credttm' atttribute is associated with.. is it the inputComboboxlitof values.. is this happening when you set the autsubmit=false for the inputcombolov? whe exactly are you seeing this error..

  • Filter operators when passing presentaion varibles takes as "equal"operator

    Hi experts,
    Please help me,...
    my requirement is to display two reports using one prompt
    1.. one report should display based on the prompt selection and the
    2..second report should display excluding the prompt selection .
    so, i created a prompt with the Quarter, Product, market and created the presentation variables for them and used them in second report (please find the img : https://picasaweb.google.com/obieegraphs/Prompts#5567705759580587890 )
    i created the first report as a normal report by prompting the prompt values using the operator "is prompted".(please find the figure : https://picasaweb.google.com/obieegraphs/Prompts#5567708538685990114 )
    in the second report i created the report as normal and passed the presentation variables with the filters using "is not equal to/ is not in" operator ( Please see here: https://picasaweb.google.com/obieegraphs/Prompts#5567712256152631874 )
    when i put all together in the dashboard the first report displays fine and the second report displays based on the "is equal to/is in" operator, where as it should have been displayed based on the operator "is not equal/ is not in".
    the report is displaying based on the "is equla to/is in" operator irrespective of what operator have been used in the filter.
    Could some one help me out on this?
    Thanks in advance,

    Hi Srikanth,
    could you please explain little more detail? how to do that using the same prompt with guided navigation?
    when i use the guided navigation we can display only one report at once, but i need to display both of the reports at the same time using the same prompt.
    any ideas?
    thanks in advance....
    Edited by: Maniswar on 30-Jan-2011 11:31

  • Can we use equals method in JSTL

    hia all,
    is there is possible to use equals method in JSTL c:when tag. if so please give me an example or else please tell me some solution.
    regards
    subramanian

    Have you tried it anyway? Where exactly are you talking about with "contents"?
    Remember that the == operator in JSTL isn't the same as the == operator in Java. In JSTL it invokes the Object#equals() method behind the scenes, while in Java it checks the equality of the reference.

  • Filtering using strtoset

    Hi,
    i have the following MDX query that uses parameters from an SSRS report to produce a result set:
     WITH MEMBER PREM AS 
    StrToMember("[Measures].[" + @PremiumType+ " Premium]")
    SELECT NON EMPTY 
    {PREM} 
    ON COLUMNS, 
    NONEMPTY 
    (Filter({ ([Prospect Client].[Account Number].[Account Number].ALLMEMBERS * 
    [Prospect Client].[Account Name].[Account Name].ALLMEMBERS *
    [Prospect Client].[Division].[Division].ALLMEMBERS *
    [Prospect Client].[Department].[Department].ALLMEMBERS *
    [Prospect Client].[Section].[Section].ALLMEMBERS *
    [Broker].[Account Direct Broker Code Previous].[Account Direct Broker Code Previous].ALLMEMBERS *
    [Broker].[Account Direct Broker Code].[Account Direct Broker Code].ALLMEMBERS * 
    [Broker].[Account Broker Name Previous - Big 6].[Account Broker Name Previous - Big 6].ALLMEMBERS *
    [Broker].[Account Broker Name - Big 6].[Account Broker Name - Big 6].ALLMEMBERS)}
    ,[Broker].[Account Broker Name - Big 6].CurrentMember.name <> [Broker].[Account Broker Name Previous - Big 6].CurrentMember.name
    AND ([Broker].[Account Broker Name Previous - Big 6].Members = "Marsh" OR [Broker].[Account Broker Name - Big 6].CurrentMember.name = "Marsh")))
    ON ROWS 
    FROM ( SELECT ( - { [Broker].[Account Broker Name Previous - Big 6].&[] } ) 
     ON COLUMNS 
     FROM ( SELECT ( STRTOSET(@Operations, CONSTRAINED) )
     ON COLUMNS 
     FROM ( SELECT( STRTOSET(@Division, CONSTRAINED) ) 
     ON COLUMNS 
     FROM ( SELECT ( STRTOSET(@DateQuarter, CONSTRAINED) ) 
     ON COLUMNS 
     FROM ( SELECT ( STRTOSET(@ProductLineGroup, CONSTRAINED) ) 
     ON COLUMNS
    FROM [Broker Premium])))))
    the query gives me what I need, however, in the filter clause there is an OR statement that checks if the value of either the 'Account Broker Name Previous - Big 6' or the 'Account Broker Name - Big 6' = "Marsh".  Instead of hard coding the
    value, i want to check a multi-valued parameter that will store the names pf the brokers.  I need to somehow replace the OR statement to filter the result set based on what is coming in from the parameter to see if either field has the value(s) from the
    parameter.
    so i basically need to replace the filter clause like this:
    [Broker].[Account Broker Name Previous - Big 6].Members = STRTOSET(@Broker) OR [Broker].[Account Broker Name - Big 6].CurrentMember.name = STRTOSET(@Broker)
    can this be done using MDX?

    Hi Scott,
    According to your description, you need to use STRTOSET function in your MDX filter like:
    [Broker].[Account Broker Name Previous - Big 6].Members = STRTOSET(@Broker) OR [Broker].[Account Broker Name - Big 6].CurrentMember.name = STRTOSET(@Broker),
    right?
    In MDX query, STRTOSET function returns the set specified by a Multidimensional Expressions (MDX)–formatted string. So you cannot use Equal from a member to a set. You can change the FILTER function to EXISTS function.
    EXISTS([Broker].[Account Broker Name Previous - Big 6].Members,STRTOSET(@Broker)) Here is a similar issue for you reference.
    https://social.msdn.microsoft.com/forums/sqlserver/en-US/6964c181-3804-4c95-aa97-7fbc84e703a6/using-the-mdx-filter-function-in-a-parameter
    Regards,
    Charlie Liao
    TechNet Community Support

  • Bug - Equals operator does work with Boolean, UUID and EUID

    Dear sirs,
    The ACS API has a serious bug that does not allow us search using the equals operator when the column type is Boolean, UUID or EUID. It is a serious API inconsistency, once the result returns empty even when you have records matching the criteria. A workaround is to use the "Contains" operator, but it's dangerous and may bring some unexpected results.
    This problems seems to be caused by the com.adobe.adept.util.PredicateUtil, line 177, due the lack of use of the method "SQLTextUtil.getSearchableFieldExpression" that makes the "Contains", "StartsWith" and "EndsWith" work for the previously cited cases.
    Do you know whether there is any prevision to fix this bug?
    Thanks in advance,
    Marcos

    It must be a bug- I tried it on UCCX 7.0(1)SR03 and it's working there.

  • Equal operator and GET in WHEN script do not trigger statement

    Dear experts,
    I want to execute a WHEN statement to calculate an account on the condition that the value on some other account is 0, with the members in all other dimensions beeing then same for both accounts. I do this in a script (to be INCLUDEd in default.lgf). I use the logic debugger to run the script. My code looks like this:
    *XDIM_MEMBERSET ACCOUNT=AAA,BBB,CCC
    *WHEN GET(ACCOUNT="AAA")
    *IS  0
    The account AAA shows a value of 0 for my CV in my EVDRE report (I  send 0, even ran a clear destination on the whole account). However the subsequent statement (ommited here) is not processed (nothing calculated). When changing the condition to NOT EQUAL the rest of the statement  is executed. My questions are: Why does the equal condition not work (I also tried =0|="0")? Is the use of GET incorrect in this case? Is there an alternative that meets my requirement?
    Best regards,
    Paul

    Hello,
    thanks for your replies. When using a different value like 1, the equal operator works as expected. With 0 it does not work, even before optimizing (there are delta values in the write back table, the sum is 0), this still makes not much sense to me.
    However, the statement is to be used even if there are no records at all. Is there a way to execute the WHEN clause based on the non existance of a record for an intersection? Based on the observation that the NOT EQUAL operator lead to an execution of the code, I suppose GET did return something? The only work arounds I see so far are:
    1. using some kind of flag
    2. enforcing a send of a non 0 value in the input schedule
    Best regards,
    Paul

  • QBE filtering using "OR" conjunction

    I would like to allow filtering on my table but set the criteria so that one or more specific rows always show up in the search regardless of the criteria entered in the table search headers. Any idea how to accomplish this? It seems that the Filter Criteria is just a map of name value pairs that are "AND'ed together. I need to add an "OR" condition that trumps all of the other QBE criteria. Ideally for better performance I would like to Union the entire filtered query with another query. I also had a thought that maybe I could copy a row from a different rowset of the same view into the filtered rowset but don't know if ADF would allow that. (ADF 11.1.1.4)

    Hi Scott,
    According to your description, you need to use STRTOSET function in your MDX filter like:
    [Broker].[Account Broker Name Previous - Big 6].Members = STRTOSET(@Broker) OR [Broker].[Account Broker Name - Big 6].CurrentMember.name = STRTOSET(@Broker),
    right?
    In MDX query, STRTOSET function returns the set specified by a Multidimensional Expressions (MDX)–formatted string. So you cannot use Equal from a member to a set. You can change the FILTER function to EXISTS function.
    EXISTS([Broker].[Account Broker Name Previous - Big 6].Members,STRTOSET(@Broker)) Here is a similar issue for you reference.
    https://social.msdn.microsoft.com/forums/sqlserver/en-US/6964c181-3804-4c95-aa97-7fbc84e703a6/using-the-mdx-filter-function-in-a-parameter
    Regards,
    Charlie Liao
    TechNet Community Support

  • OBIEE 10g answers display filters used in result

    Hi,
    Is it possible to display the values of filters used in the result of an answer report?
    E.g.
    answer report:
    branch, sales
    Filters: branch = 1
    I want to show the filters used in the result in compound view. I have tired different views, none of them seems to work for this.
    I know I can put it in a dashboard with prompts so users can see the filters applied. But just curious is there any way to do it in the answers? Because in dashboard, it only prints PDF or HTML, but in answers it can print excel, which is what I want.

    In compoud Layout itself, there is option to add filter view. in the top of the answers resuls, you can find some tools and tabs, there you can find add view, by adding the filter view you can have the filter in the compound layout and you can see it printed in PDF like below.
    Fiscal Period
    Closing Amount
    2012-12     
    11.9
    2013-01    
    93.52
    Fiscal Period is equal to 2012-12 , 2013-
    01
    Try it and let me know if it works.

  • Error while using between operator with sql stmts in obiee 11g analytics

    Hi All,
    when I try to use between operator with two select queries in OBIEE 11g analytics, I'm getting the below error:
    Error Codes: YQCO4T56:OPR4ONWY:U9IM8TAC:OI2DL65P
    Location: saw.views.evc.activate, saw.httpserver.processrequest, saw.rpc.server.responder, saw.rpc.server, saw.rpc.server.handleConnection, saw.rpc.server.dispatch, saw.threadpool.socketrpcserver, saw.threads
    Odbc driver returned an error (SQLExecDirectW).
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 27002] Near <select>: Syntax error [nQSError: 26012] . (HY000)
    can anyone help me out in resolving this issue.

    Hi All,
    Thank u all for ur replies, but I dint the exact solution for what I'm searching for.
    If I use the condition as
    "WHERE "Workforce Budget"."Used Budget Amount" BETWEEN MAX("Workforce Budget"."Total Eligible Salaries") AND MAX("Workforce Budget"."Published Worksheet Budget Amount"",
    all the data will be grouped with the two columns which I'm considering in the condition.
    my actual requirement with this query is to get the required date from a table to generate the report either as daily or weekly or monthly report. If I use repository variables, variables are not getting refreshed until I regenerate the server(which I should not do in my project). Hence I have created a table to hold weekly start and end dates and monthly start and end dates to pass the value to the actual report using between operator.
    please could anyone help me on this, my release date is fast approaching.

  • I am new in using Mac operating system, kindly suggest ebooks , videos or audio books to me so that i can learn more about it?

    i am new in using Mac operating system, kindly suggest ebooks, videos or audio books to me so that i can learn more about it.
    any kind of help would be appriciated. i am very eager to learn.how to make ios application? and how to effectively use terminal? where does the basic programming start in Mac? what are the different tools that can help me make an Mac application and ios application.
    -Thank you
    Shailendra (India)

    Apple has got some great guides to start developing in Objective-C, used for programming OS X and iOS apps > http://developer.apple.com/library/mac/#referencelibrary/GettingStarted/RoadMapO SX/chapters/01_Introduction.html

  • Problem when using About Operator in Contains Query

    Hi,
    I'm new to Oracle and this forums too. I have a problem when using about operator in contains query.
    I create a table with some records and then create a context index on 'name' column.
    CREATE TABLE my_items (
      id           NUMBER(10)      NOT NULL,
      name         VARCHAR2(200)   NOT NULL,
      description  VARCHAR2(4000)  NOT NULL,
      price        NUMBER(7,2)     NOT NULL
    ALTER TABLE my_items ADD (
      CONSTRAINT my_items_pk PRIMARY KEY (id)
    CREATE SEQUENCE my_items_seq;
    INSERT INTO my_items VALUES(my_items_seq.nextval, 'Car', 'Car description', 1);
    INSERT INTO my_items VALUES(my_items_seq.nextval, 'Train', 'Train description', 2);
    INSERT INTO my_items VALUES(my_items_seq.nextval, 'Japan', 'Japan description', 3);
    INSERT INTO my_items VALUES(my_items_seq.nextval, 'China', 'China description', 4);
    COMMIT;
    EXEC ctx_ddl.create_preference('english_lexer','basic_lexer');
    EXEC ctx_ddl.set_attribute('english_lexer','index_themes','yes');
    EXEC ctx_ddl.set_attribute('english_lexer','theme_language','english');
    CREATE INDEX my_items_name_idx ON my_items(name) INDEXTYPE IS CTXSYS.CONTEXT PARAMETERS('lexer english_lexer');
    EXEC ctx_ddl.sync_index('my_items_name_idx');Then I perform contains query to retrieve record :
    SELECT count(*) FROM my_items WHERE contains(name, 'Japan', 1) > 0;
    COUNT(*)
          1
    SELECT count(*) FROM my_items WHERE contains(name, 'about(Japan)', 1) > 0;
    COUNT(*)
          1But the problem is when I using ABOUT operator like in Oracle's English Knowledge Base Category Hierarchy it return 0
    SELECT count(*) FROM my_items WHERE contains(name, 'about(Asia)', 1) > 0;
    COUNT(*)
          0
    SELECT count(*) FROM my_items WHERE contains(name, 'about(transportation)', 1) > 0;
    COUNT(*)
          0I can't figure out what 's wrong in my query or in my index.
    Any help will be appreciated.
    Thanks,
    Hieu Nguyen
    Edited by: user2944391 on Jul 10, 2009 3:25 AM

    Hello (and welcome),
    You'd be best asking this question in the Oracle Text forum, here:
    Text
    And by the way, it will help others to analyse if you put {noformat}{noformat} (lowercase code in curly brackets) before and after your code snippets.
    Good luck!                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Why do we use Allowed Operations in DML Process

    Hello,
    Why do we use Allowed Operations in DML Process ??
    Can you please clear this confusion:
    I am using apex 4.1. oracle 11g R2 SOE ...
    Using the Wizard, I created a Form and IR on Dept Table...
    In the form page:
    - Create Button
    The name is "CREATE"
    NO Database Action
    - DML Process
    Allowed Operations: nothing is checked
    This will insert a new row in the Dept table
    In the form page:
    - Create Button
    The name is "CREATE2"
    Database Action : insert
    - DML Process
    Allowed Operations: nothing is checked
    This will insert a new row in the Dept table
    So, What difference does it make if INSERT check box in Allowed Operations of DML Process is TICKED OR NOT ??
    Regards,
    Fateh

    kdm7 wrote:
    Okay.
    So can we keep a web button to access the www.ni.com ? So that web site opens only when button pressed?
    P.S  I,m a newbie.
    Yes, you can also, e.g. include a help file or manual as html and open that in the browser.
    /Y
    LabVIEW 8.2 - 2014
    "Only dead fish swim downstream" - "My life for Kudos!" - "Dumb people repeat old mistakes - smart ones create new ones."
    G# - Free award winning reference based OOP for LV

  • Error (Error when starting a SWITCH branch) while using container operation

    HI Experts,
    I am using container operation step for moving internal table (ref to sflight) to workarea.The error I found in the log is ' Error when starting a SWITCH branch'.Kindly help me in finding the solution.Below are the steps and code.
    Result Element = lw_sflight             (Element ref to sflight with export and Import)
    Assignment     =    =                     (Assign (contents of table are deleted first)
    Expression      = &FLIGHT&             (Multi line container ref to sflight)
    Operator          = Assignment
    Expression      =                                 (Blank)
    Thanks and Regards,
    Srini

    Hello,
    Maybe you should show more information about the condition step instead of the container operation step.
    A previous poster in SDN said they solved their problem by changing the order of the conditions.
    regards
    Paultje Bakker
    Hanabi Technology

  • Problem in JDBC , when using LIKE operator. - VERY URGENT

    Problem in JDBC , when using LIKE operator.
    LINE 1 : String temp = "AA";
    LINE 2 : String query = "select * from emp where EMPNAME like '*temp*' ";
    LINE 3 : Staement st = con.createStaement();
    LINE 4 : ResultSet rs = st.executeQuery(query);
    '*' character is not getting evaluated. In MS ACCESS2000 only * is accepted instead of '%'. Moreover in MS ACCESS the like operator has to be used within double quotes as a String. whereas in other databases, it accepts single quotes as a String.
    Ex:
    In MS ACCESS
         select * from emp where ename like "*aa*";
    Other Databases
         select * from emp where ename like '%aa%';
    In my situation iam passing a Variable inside a like operator and '*' is used.
    For the above Scenario, Please help me out.
    If possible Kindly let me know the exact Syntax.
    Please give me the answer as LINE1,LINE2,LINE3,LINE4,
    I have verified in JDBC Spec also, it has been specified to use escape sequence.that too did not work.
    Due to this, My project is in hold for about 4 days. I could not find a suitable solution.
    Please help me out.

    I made a LIKE clause work with M$ Access, using PreparedStatement and the % wildcard:
                escapeStr                   = "%";
                String sql                  = "SELECT USERNAME, PASSWORD FROM USERS WHERE USERNAME LIKE ?";
                PreparedStatement statement = connection.prepareStatement(sql);
                statement.setString(1, ("user" + escapeStr));
                ResultSet resultSet         = statement.executeQuery();
                while (resultSet.next())
                    System.out.println("username: " + resultSet.getObject("USERNAME") + " password: " + resultSet.getObject("PASSWORD"));

Maybe you are looking for

  • Executing A Procedure In a Package Using DBLink

    I need to execute a procedure which is residing in a package using dblink. The package got a execute PUBLIC grant. When I execute the following statement, I am getting error ORA: 00904, Invalid Identifier select PKG_NAME.PROCEDURE_NAME@dblink(null,nu

  • Strange display problems: lines, missing icons, pieces of windows that stay on screen...

    My white 24" iMac has recently started having problems with the display. Because I'm able to capture it with Grab and due to the nature of the problem, it doens't appear to be hardware related. But, not sure. See the screen cap I took below as an exa

  • Ipod cant find music

    My ipod suddenly won't find my music. I-tunes still has it all, but the computer now won't "mount ipod". The ipod memory shows that there are files still on it. Reset does not help. Last time I ran the battery down, then recharged it and the music ap

  • Pos software lost playlists after updating

    So I updated Itunes and the program erased my playlists. Some are on my ipod, how do I restore them with out manually doing every bloody one. And how do I get the ones not on the ipod back. <edited by host>

  • VERY VERY slow performance!!! HELP, DW 8

    I have a brand new MacBook Pro running Dreamweaver 8.0, just downloaded last week. I am in the middle of a big project adding basic content to a new site. EVERYTHING I do takes a VERY long time to complete. For instance, i can be waiting several minu