Use EVALUATE_PREDICATE function as filter in an anlysis

Hi guys,
I'm struggling to get the proper syntax to use the EVALUATE_PREDICATE as a filter on a column in an OBIEE analysis.
I'm using an EVALUATE function to determine the rank of 'Test Naam' in the result set (CAST(EVALUATE('DENSE_RANK() OVER (PARTITION BY %2 ORDER BY %1)'AS INTEGER,"Test Definities"."Test Naam","Procestransformatie"."Procestransformatie Code") as DOUBLE)). This returns results for i.e. 12 tests. Now I want to split up this resultset into 3 sets of graphs on a dashboard (1-4, 5-8 and 9-12).
I cannot apply a regular filter on this column because it then returns an error message. Apparently the solution to avoid this error is to apply the EVALUTE_PREDICATE function as a filter. But I cannot get the proper syntax to work...
I hope someone can help me out. Thanks in advance!
Best Regards,
Jeroen

Hi Could anyone help me with this please...

Similar Messages

  • How to use, Case function and Filter in Column Formula?

    Hello All,
    I am using case function and also would like to filter value to populate.
    Below is showing error :
    case
    when '@{Time}' = 'Year' then "Time"."Fiscal Year"
    when '@{Time}' = 'Quarter' then "Time"."Fiscal Quarter"
    when '@{Time}' = 'Month' then FILTER ("Time"."Fiscal Period" USING "Time"."Fiscal Period" NOT LIKE 'A%')
    else ifnull('@{Time}','Selection Failed') end
    Thanks, AK

    when '@{Time}' = 'Month' then FILTER ("Time"."Fiscal Period" USING "Time"."Fiscal Period" NOT LIKE 'A%')I dont think Filter this works here or any other data types except number.
    Try to use option Column's->Filter->Advanced->Convert this filter to SQL
    If helps mark

  • How do i use PL/SQL function in filter operator

    Hi,
    i want to use one pl/sql function in filter operator. how do i use it in filter condition.
    error i am getting is
    " error occured during expression validatation.
    my filter condition is
    INOUTGRP1.LAST_UPDATE_DATE > "GET_LAST_UPDATE_DATE"()
    can any one suggest me what is the problem for this error.
    Regards,
    Jyothy

    I tried and getting the same error. don't know why!!
    However, There is another way of accomplishing it.
    You can add a "Mapping Input Parameter" to your mapping and in the default value field call the function "Get_Last_Update_date". Then add the output field from this operator to the filter operator. Then edit the filter condition to replace the function call with output value from the Input parameter operator.
    This should work...

  • How to filter group using in function

    Hey
    i am trying to do a group filter in the data model using IN function
    g.segment3 in ('401000', '401010', '401020', '409100')
    how can i configure the filter is in one of these values ?
    i tried the
    g.segment3 in ('401000', '401010', '401020', '409100') but its showing me an error
    any reason why ?
    thanks

    Hey
    i am trying to do a group filter in the data model using IN function
    g.segment3 in ('401000', '401010', '401020', '409100')
    how can i configure the filter is in one of these values ?
    i tried the
    g.segment3 in ('401000', '401010', '401020', '409100') but its showing me an error
    any reason why ?
    thanks

  • Problem using MDX functions in Answers Filter

    I'm using OBIEE 10.1.3.2.
    I'm using an Essbase cube as my datasource (aggregate storage).
    My level 0 members in my Date dimension are of the format yyyy-mm-dd (e.g., 2011-08-13)
    I have a dashboard prompt selecting the date from a calendar which returns the date and time (yyyy-mm-dd hh:mm:ss). So naturally I can't do just a straight equals between the prompt value and the member value.
    What I've written in the filter sql in Answers is: Date.Days = Evaluate('SUBSTRING(%1,1,10)','@{varStartDate}')
    The log shows the following:
    -------------------- SQL Request:
    SELECT Date.Days saw_0, main.total_completed_orders saw_1 FROM SIKAgg2 WHERE Date.Days = Evaluate('SUBSTRING(%1,1,10)','2011-08-09 00:00:00') ORDER BY saw_0
    -------------------- Sending query to database named mezen (id: <<9648>>):
    With
    set [Date4] as 'Filter([Date].Generations(4).members, (([Date].CurrentMember.MEMBER_ALIAS = "2011-08-09 00:00:00" OR [Date].CurrentMember.MEMBER_Name = "2011-08-09 00:00:00")))'
    select
    { [Measures].[total_completed_orders]
    } on columns,
    NON EMPTY {SUBSTRING(,1,10)SUBSTRING(,1,10)SUBSTRING(,1,10){[Date4]}} properties ANCESTOR_NAMES, GEN_NUMBER on rows
    from [SIKAgg2.main]
    So with all that being said it doesn't appear that the MDX function SUBSTRING is actually doing anything.
    1) Am I using the function incorrectly?
    2) Is there a better way to do this? I really just need to get rid of the time portion of the variable from the date prompt.
    Any help/guidance would be greatly appreciated. Spending too much time with trial and error approach.
    Thanks,
    Brad

    Brad,
    Try this way..In OBIEE RPD - Physical Layer for level 0 members in my Date dimension. Double click this member and check its type. Change the type to 'DATE' from 'DATETIME'. Delete the Date Dimension in BMM layer & Presentation Layer for again drag and drop from Physical Layer after changing the Type in physical layer.
    Normal way of building the RPD using Essbase
    Something similar to this http://www.rittmanmead.com/2009/03/dates-timestamp-and-oracle-bi-answers-filters/
    This shud solve your timestamp problem everywhere. This is one of the most common problem for Oracle sources. I have essbase as a source but unfortunately I can't replicate it as this is not having time level.
    Let me know if this solves your problem...
    In case the type is DATE only in RPD then I'll try to provide a diff soln here.
    Hope this helps

  • Unable to apply report filter by using Previous Function

    Hello,
    I am new to Webi and need your expertise.  I created a varible using Previous Function.  The varible works fine when you view it.  However, it doesn't work when I tried to apply this varible in the report filter. 
    Here are the varibles:
    Varible A = Previous([Field A]; ([Field B]; [Field C]))
    DisplayVarible = If([Varible A] = 'Letter A'; 1; 0)
    I learned that when applying Display Varible in the report filtes, the Value(s) from list is grayed out.  How do I fix this?
    Thank you.

    The objective is to find the turnaround time from one customer to the next customer.  For example, you have a hair saloon shop and you want to know how long does it take when you finish one customer and start the next customer.
    Customer  PreviousTimeEnd       Time Begin            Time End            Time Diff(Time Begin - Previous Time End)
    A                                 7:00                    7:30                                                                     
    B               7:30              7:45                    8:30                15
    C               8:30              9:00                    9:30                30
    D               9:30              9:45                   10:00                15
    As you can see, I can calculate the minutes difference.  However, I cannot apply time difference varible in the report filter.  I hope I have provided you enough info.  Thank you for your help.

  • How to get a list of values used in the WHERE filter of stored procedures and functions in SQL Server

    How can I get a list of values (one or more) used in the WHERE filter of stored procedures and functions in SQL Server?
    How can get a list of values as shown (highlighted) in the sample stored procedure below?
    ALTER PROC [dbo].[sp_LoanInfo_Data_Extract] AS
    SELECT   [LOAN_ACCT].PROD_DT,
                  [LOAN_ACCT].ACCT_NBR, 
                  [LOAN_NOTE2].OFCR_CD, 
                  [LOAN_NOTE1].CURR_PRIN_BAL_AMT, 
                  [LOAN_NOTE2].BR_NBR,
    INTO #Table1
    FROM
                    dbo.[LOAN_NOTE1],
                    dbo.[LOAN_NOTE2],
                    dbo.[LOAN_ACCT]
    WHERE
                    [LOAN_ACCT].PROD_DT = [LOAN_NOTE1].PROD_DT
                    and
                    [LOAN_ACCT].ACCT_NBR = [LOAN_NOTE1].ACCT_NBR
                    and
                    [LOAN_NOTE1].PROD_DT = [LOAN_NOTE2].PROD_DT
                    and
                    [LOAN_NOTE1].MSTR_ACCT_NBR = [LOAN_NOTE2].MSTR_ACCT_NBR
                    and
                    [LOAN_ACCT].PROD_DT = '2015-03-10'
                    and
                    [LOAN_ACCT].ACCT_STAT_CD IN
    ('A','D')
                    and
                    [LOAN_NOTE2].LOAN_STAT_CD IN
    ('J','Z')
    Lenfinkel

    Hi LenFinkel,
    May I know what is purpose of this requirement, as olaf said,you may parse the T-SQL code (or the execution plan), which is not that easy.
    I have noticed that the condition values in your Stored Procedure(SP) are hard coded and among them there is a date values, I believe some day you may have to alter the SP when the date expires. So why not declare 3 parameters of the SP instead hard coding?
    For multiple values paramter you can use a
    table-valued parameter. Then there's no problem getting the values.
    If you could elaborate your purpose, we may help to find better workaround.
    Eric Zhang
    TechNet Community Support

  • Can we use replace function in bursting control file?

    Hi All,
    Greetings!!!!!!!!!!
    Have a doubt can we use sql functions like replace,nvl,decode.. in xml bursting control file.
    Please let me know if there is a option.
    awaiting reply...
    Thanks
    Rajesh

    In Expression operator or in Filter, etc. you can type function name by hand.
    Oleg

  • Can we use SOUNDEX function in OWB?

    Hi
    Can we use SOUNDEX function in OWB. If yes then how?
    Regards
    Vibhuti

    In Expression operator or in Filter, etc. you can type function name by hand.
    Oleg

  • When using TODATE function MDX query is not correctly generated

    Essbase 9.3.1.2 and OBIEE 10.1.3.4.1.
    When using TODATE function MDX query is not correctly generated.
    This leads to unexpected values not only on cumulative columns in report (generated with TODATE), but also other columns (calculated with AGO function or directly read from cube) have incorrect values.
    The problem occurs when you filter on a column that is not in the select list. If you filter on just one level of dimension, results are fine. You can filter on multiple dimensions as long as you filter on just one level of each dimension.
    If you filter on two or more levels of one dimension, than results are not correct. In some cases results for TODATE column are all zeros, in some cases it is a random value returned by Essbase (same random value for all rows of that column), and in some cases BI Server returns an error:
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. Essbase Error: Network error [10054]: Cannot Send Data (HY000).
    Here is generated MDX code:
    With
    set [Grupe proizvoda2] as '{[Grupe proizvoda].[N4]}'
    set [Grupe proizvoda4] as 'Generate([Grupe proizvoda2], Descendants([Grupe proizvoda].currentmember, [Grupe proizvoda].Generations(4), leaves))'
    set [Segmentacija2] as '{[Segmentacija].[RETAIL]}'
    set [Segmentacija4] as 'Filter(Generate({[Segmentacija2]}, Descendants([Segmentacija].currentmember, [Segmentacija].Generations(4),SELF), ALL), ([Segmentacija].CurrentMember IS [Segmentacija].[AFFLUENT]))'
    set [Vrijeme3] as '{[Vrijeme].[MJESEC_4_2009]}'
    member [Segmentacija].[SegmentacijaCustomGroup]as 'Sum([Segmentacija4])', SOLVE_ORDER = AGGREGATION_SOLVEORDER
    member [Accounts].[MS1] as '(ParallelPeriod([Vrijeme].[Gen3,Vrijeme],2,[Vrijeme].currentmember), [Accounts].[Trosak kapitala])'
    member [Accounts].[MS2] as '(ParallelPeriod([Vrijeme].[Gen3,Vrijeme],1,[Vrijeme].currentmember), [Accounts].[Trosak kapitala])'
    member [Accounts].[MS3] as 'AGGREGATE({PeriodsToDate([Vrijeme].[Gen2,Vrijeme],[Vrijeme].currentmember)}, [Accounts].[Trosak kapitala])'
    select
    { [Accounts].[Trosak kapitala],
    [Accounts].[MS1],
    [Accounts].[MS2],
    [Accounts].[MS3]
    } on columns,
    NON EMPTY {crossjoin ({[Grupe proizvoda4]},{[Vrijeme3]})} properties ANCESTOR_NAMES, GEN_NUMBER on rows
    from [NISE.NISE]
    where ([Segmentacija].[SegmentacijaCustomGroup])
    If you remove part with TODATE function, the results are fine. If you leave TODATE function, OBIEE returns an error mentioned above. If you manually modify variable SOLVE_ORDER and set value to, for example, 100 instead of AGGREGATION_SOLVEORDER, results are OK.
    In all cases when this variable was modified in generated MDX, and query manually executed on Essabse, results were OK. This variable seems to be the possible problem.

    Hi,
    Version is
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bi
    PL/SQL Release 10.2.0.5.0 - Production
    CORE    10.2.0.5.0      Production
    TNS for 64-bit Windows: Version 10.2.0.5.0 - Production
    NLSRTL Version 10.2.0.5.0 - Production
    Sorry, in my last post i forgot to mention that i already created a function based index but still it is not using because, there is a UNIQUE constraint on that column.
    Thanks

  • Using a function return in an "IN" statement

    All,
    I need to filter the records in a table based on the return value of a function. The function determines a person's group and then executes 2 separate select statements depending on the group.
    CREATE OR REPLACE PACKAGE pkg_rolebased
    AS
    CURSOR all_dmn_cur
    IS
    SELECT dmn_id
    FROM tomwojeck.pa_domain ;
    CURSOR child_dmn_cur (role_id_in IN varchar)
    IS
    SELECT distinct r.dmn_id
    FROM tomwojeck.pa_domain_restriction_domain r
    WHERE r.dmn_restriction_id IN (
    SELECT DISTINCT a.dmn_restriction_id
    FROM tomwojeck.pa_role_wf_entity_fct_access a
    WHERE a.role_id = role_id_in
                        AND a.workflow_entity_fct_id= 'View Student.Student.View'
                        AND a.dmn_restriction_id IS NOT NULL);
    FUNCTION rolelookup (stud_email IN varchar)
    RETURN roletable;
    END;CREATE OR REPLACE PACKAGE BODY pkg_rolebased
    IS
    FUNCTION rolelookup (stud_email IN varchar)
    RETURN roletable
    IS
    v_roleid varchar2(200);
    v_returnval varchar2(200);
    v_data roletable := roletable ();
    dmn_rec all_dmn_cur%ROWTYPE;
    BEGIN
    -- Find out the role of the person
    SELECT r.role_id
    INTO v_roleid
    FROM tomwojeck.pa_user_prfl p, tomwojeck.pa_user_prfl_role r
    WHERE p.user_name = r.user_name
    AND UPPER (p.email_addr) = UPPER (stud_email);
    IF UPPER (v_roleid) = 'ALL'
    THEN
    OPEN all_dmn_cur;
    LOOP
    FETCH all_dmn_cur
    INTO dmn_rec;
    v_data.EXTEND;
    v_data (v_data.COUNT) := dmn_rec.dmn_id;
    EXIT WHEN all_dmn_cur%NOTFOUND;
    END LOOP;
    CLOSE all_dmn_cur;
    ELSE
    OPEN child_dmn_cur (v_roleid);
    LOOP
    FETCH child_dmn_cur
    INTO dmn_rec;
    v_data.EXTEND;
    v_data (v_data.COUNT) := dmn_rec.dmn_id;
    EXIT WHEN child_dmn_cur%NOTFOUND;
    END LOOP;
    CLOSE child_dmn_cur;
    END IF;
    RETURN v_data;
    END rolelookup;
    END;
    The select statement to filter on this mess is:
    select
    lname,
    fname,
    dmn_id,
    stud_id
    from tomwojeck.pa_student p
    where p.DMN_ID in (select * from table(cast(tomwojeck.pkg_rolebased.rolelookup('[email protected]') as tomwojeck.RoleTable)))
    The problemm is this performs horribly! If I enter an email address that causes the first cursor to be used, it runs well, but if I use an email address that causes the second cursor to run, it takes forever.
    Is there a better way to do this?
    Thanks,
    Tom Wojeck

    <<The version of Oracle is 9i.>>
    Could you specify the exact version? For example, 9.2.0.3.0.
    <<I'm not sure of the query optimizer version. How do I find that?>>
    SQL> show parameter optimizer_mode
    NAME                                 TYPE
    VALUE
    optimizer_mode                       string
    CHOOSE<<The interestin thing is that the function itself runs well; it's when I try to use the function as an "IN" clause that the performance degrades. It almost seems as though the database is retrieving each row from the student table, and then running the function to see if there are any matches. >>
    Your query has to be tuned. The execution plan as well as the information on the indexes will certainly help.

  • Error while using the Geospatial Range FIlter

    Hello,
    When I try to use the Geospatial Range Filter I get the error:
    javax.portlet.PortletException: com.endeca.portal.data.DataSourceException: An error occurred while executing query: exception encountered while executing external function 'internal:navigation-query', caused by error endeca-err:MDEX0001 : Invalid input : Error in selection filter: "DISTANCE" is not a valid function on the types (mdex:geocode-set, mdex:geocode)
    Can anybody help me?
    Thanks!
    Marco

    Marco,
    you are dealing here with trying to use a function DISTANCE on mdex:geocode type and mdex:geocode-set, where:
    mdex:geocode Represents a latitude and longitude pair. Used for atomic values (from single-assign geocode attributes).
    mdex:geocode-set  Represents a latitude and longitude pair. Used for sets (from multi-assign geocode attributes).
    However, many functions and operators work on atomic data types and do not support sets.
    Quoting from the EQL Guide:
    Important: With three exceptions, all the functions and operators described in this chapter work only on atomic data types. That is, they are not supported with sets. The three exceptions are
    ARB,COUNT, and
    COUNTDISTINCT. For information on the set functions, see  Sets and Multi-assign Data.

  • User-defined function in FILTER clause

    hi,
    can i create the user-defined functions and use them in the FILTER clause in the sem_match function? there are some built-in functions for the FILTER clasue. however, only one function (DATATYPE(literal)) support for date/time in the built-in functions. i want to implement some user-defined funcitons in the FILTER clause which can check time intervals in ontology. there are some functions about valid time in the WorkSpace Manager such as WM_OVERLAPS, WM_CONTAINS,WM_MEETS, etc. so, can i write some functions using the these valid time functions in WM and use them in the FILTER clause? thanks a lot in advance.
    hong

    Hi Hong,
    You don't need user-defined functions to do time interval comparisons. You can directly compare xsd:dateTime values with the built-in comparison operators: <, >, =, !=, <=, >=
    For example, the query pattern below could find events that happened during event1 if we have data such as:
    :event1 :startTime "2013-01-01T03:15:00Z"^^xsd:dateTime .
    :event1 :endTime "2013-02-01T02:15:00Z"^^xsd:dateTime .
    :event2 :startTime "2013-01-11T14:15:00Z"^^xsd:dateTime .
    :event2 :startTime "2013-01-14T12:15:00Z"^^xsd:dateTime .
    SELECT ?e2
    WHERE
    { :event1 :startTime ?e1_st; :endTime ?e1_et .
    ?e2 :startTime ?e2_st; endTime ?e2_et .
    FILTER (?e1_st < ?e2_st && ?e2_et < ?e1_et) }
    In general, it is trivial to convert interval relations such as meets and overlaps to conditions on start and end times.
    Hope this helps.
    - Matt

  • Use EVALUATE function in obiee

    Hi ALL
    i hv a database query like this;
    select
    deptno,
    rtrim (xmlagg (xmlelement (e, ename || ',')).extract ('//text()'), ',') enamesfrom
    emp
    group by
    deptno;
    now, i want to use this using Evaluate function in obiee column formula.
    thn how to do it.
    Please reply.
    THX
    SAP

    Hello SAP,
    I have seen you for sometime and one thing I came to know is you are creating threads and once you got your solution or you dont feel to follow up you are just leaving the thread.
    see few here,
    Sorting month name
    Drill down problem
    Re: Filter in Union Request
    so please better close the threads which are answered and proceed further.

  • How to use complex function as condition in Oracle Rule Decision Table?

    How to use complex function as condition in Oracle Rule Decision Table?
    We want to compare an incoming date range with the date defined in the rules. This date comparison is based on the input date in the fact & the date as defined for each rule. Can this be done in a decision table?

    I see a couple of problems here.
    First, what you posted below is not a syntactically valid query. It seems to be part of a larger query, specifically, this looks to be only the GROUP BY clause of a query.
    Prabu ammaiappan wrote:
    Hi,
    I Have a group function in the Query. Below is the Query i have used it,
    GROUP BY S.FREIGHTCLASS,
    R.CONTAINERKEY,
    S.SKU,
    S.DESCR ||S.DESCRIPTION2,
    S.PVTYPE,
    RD.LOTTABLE06,
    R.WAREHOUSEREFERENCE,
    RD.TOLOC,
    R.ADDWHO,
    R.TYPE,
    S.CWFLAG,
    S.STDNETWGT,
    S.ORDERUOM,
    R.ADDDATE,
    C.DESCRIPTION,
    (CASE WHEN P.POKEY LIKE '%PUR%' THEN 'NULL' ELSE to_char(P.PODATE,'dd/mm/yyyy') END),
    NVL((CASE WHEN R.ADDWHO='BOOMI' THEN RDD.SUPPLIERNAME END),SS.COMPANY),
    RDD.BRAND,
    S.NAPA,
    RD.RECEIPTKEY,
    R.SUSR4,
    P.POKEY,
    RDD.SUSR1,
    r.STATUS, DECODE(RDD.SUSR2,' ',0,'',0,RDD.SUSR2),
    rd.SUSR3Second, the answer to your primary question, "How do I add a predicate with with a MAX() function to my where clause?" is that you don't. As you discovered, if you attempt to do so, you'll find it doesn't work. If you stop and think about how SQL is processed, it should make sense to you why the SQL is not valid.
    If you want to apply a filter condition such as:
    trunc(max(RD.DATERECEIVED)) BETWEEN TO_DATE('01/08/2011','DD/MM/YYYY') AND TO_DATE('01/08/2011','DD/MM/YYYY')you should do it in a HAVING clause, not a where clause:
    select ....
      from ....
    where ....
    group by ....
    having max(some_date) between this_date and that_date;Hope that helps,
    -Mark

Maybe you are looking for

  • Jittery motion when editing to tape via Blackmagic SD

    I have a situation that has me a bit perplexed, and I'm hoping one of you gurus can help. We will shoot DVCAM footage, capture into FCP (now at v5.03, but this occurred with earlier versions as well), and then export a quicktime movie (not using Quic

  • IPad Numbers IF AND functions

    Hopefully someone can help with the IF AND functions in Numbers for iPad. The formula(s) that I am using works fine in both Excel and in Numbers, but I am not able to make them work as a combine entity in Numbers for iPad and wonder if someone have a

  • Sytem restrictions during Releasing new Cost Estimate during the year

    Hi, We are currently using Moving Average Price for Traded materials (Material type ZHAW) with Price Control indicator "V". We have an internal requirement to change the basis of valuation to Standard Cost immediately. Thus we have to change the foll

  • Multicast sessions page of server properties

    I am using ZEN 4.0.1 ir7, Netware 6.5sp4, ConsoleOne 1.3.6e. I was creating multicast sessions on the multicast sessions page of server properties for later use by my technician. I had created 5 sessions, then closed the property page. Then later I w

  • Sony Vaio VGN-N27LH - some questions SOLVED

    SOLVED - I installed the sony_acpi module from AUR and run the following to dim: echo "4" > /proc/acpi/sony/brightness Would still be grateful if anyone could advise on what else I need to consider when running linux on a laptop.  My original questio