ASO question using Level0 member in a condition

Dear friends,
Issue with a ASO Formula, here case statement when using level 0 is not working,
we need to use one of the dimension(Entity_) all level 0, rest of the dimensions using one member.
Thanks in advance.
Regards
Jay
Case
when (([Dim1],[Dim2],[Dim3],[Dim4]) = 1) /*Here the code verifies for a condition for the combnitation of Dim1,Dim2,Dim3,Dim4 to value 1*/
and
Islevel([enity].[PB],0) /* Here it has to work for all entities*/ (having issue at this point)
else
[01] /* If not 1 the value is set to 01*/
end

You might try:
Case When Islevel([enity].currentmember,0) Then
Case When(([Dim1],[Dim2],[Dim3],[Dim4]) = 1) Then
I don't see what you want to claculate here
Else
1
End
End
A couple of things,
1. you don't have a formula if the embeded case is true
2. What do you want to do if it is not level zero? In some cases you will need to add a else between the two end statements and have a formula like
sum([Entity].currentmember.children,[this member name])
3. you referenced [entity].[db]. IS that a level 0 member? do you want all level 0 entity members, or just the ones under it? Depending on what you want, the syntax of the first case statement changes.

Similar Messages

  • Is there any way to an index that can be used to include the "OR condition "?

    Hello I have some questions.
    The test was conducted in the following procedure .
    create table test
    c1 varchar2(10),
    c2 varchar2(10),
    primary key(c1)
    create index test_idx1 on test(c2);
    Command> explain select * from test where c1 = 'AAAAAAAAAA' or c2 = 'AAAAAAAAAA';
    Query Optimizer Plan:
      STEP:                1
      LEVEL:               1
      OPERATION:           RowLkRangeScan
      TBLNAME:             TEST
      IXNAME:              TEST
      INDEXED CONDITION:   <NULL>
      NOT INDEXED:         TEST.C2 = 'AAAAAAAAAA' OR TEST.C1 = 'AAAAAAAAAA'
    Command>
    Command> explain select * from test where c1 = 'AAAAAAAAAA' and c2 = 'AAAAAAAAAA'
    Query Optimizer Plan:
      STEP:                1
      LEVEL:               1
      OPERATION:           RowLkRangeScan
      TBLNAME:             TEST
      IXNAME:              TEST
      INDEXED CONDITION:   TEST.C1 = 'AAAAAAAAAA'
      NOT INDEXED:         TEST.C2 = 'AAAAAAAAAA'
    Command>
    By including the "OR condition " in this test does not use the index.
    Is there any way to an index that can be used to include the "OR condition "?
    Thanks.
    GooGyum.

    A database cannot in general use indexes in this way for an 'or' involving two different columns. However, for this specific example one can easily rewrite the query using 'UNION' to use the relevant indexes while still giving the same (correct) result:
    Command> explain select * from test t1 where t1.c1 = 'AAAAAAAAAA' union select * from test t2 where t2.c2 = 'AAAAAAAAAA';
    Query Optimizer Plan:
      STEP:                1
      LEVEL:               1
      OPERATION:           RowLkRangeScan
      TBLNAME:             TEST
      IXNAME:              TEST
      INDEXED CONDITION:   T1.C1 = 'AAAAAAAAAA'
      NOT INDEXED:         <NULL>
      STEP:                2
      LEVEL:               2
      OPERATION:           RowLkRangeScan
      TBLNAME:             TEST
      IXNAME:              TEST_IDX2
      INDEXED CONDITION:   T2.C2 = 'AAAAAAAAAA'
      NOT INDEXED:         <NULL>
      STEP:                3
      LEVEL:               1
      OPERATION:           OrderBy
      TBLNAME:             <NULL>
      IXNAME:              <NULL>
      INDEXED CONDITION:   <NULL>
      NOT INDEXED:         <NULL>
      STEP:                4
      LEVEL:               2
      OPERATION:           UnionMergeSort
      TBLNAME:             <NULL>
      IXNAME:              <NULL>
      INDEXED CONDITION:   <NULL>
      NOT INDEXED:         <NULL>
    Maybe you can apply a similar trick? If you know there is no possibility of duplicate rows then you can further optimise this (in terms of performance) by using UNION ALL.
    Chris

  • Error in using a variable in filter condition in an Interface

    Hi All,
    I am using a variable in my interface in a filter condition. I have an EMP table of scott schema and want to pull all the records wiht hiredate date lying between 2 dates, incremental pull.For this I have created 2 variables and using them in the filter condition. I am getting an error inthe interface when I run in a package after declaring and refresing the variables.
    com.sunopsis.sql.SnpsMissingParametersException: Missing parameter
         at com.sunopsis.sql.SnpsQuery.completeHostVariable(SnpsQuery.java)
         at com.sunopsis.sql.SnpsQuery.updateExecStatement(SnpsQuery.java)
         at com.sunopsis.sql.SnpsQuery.executeUpdate(SnpsQuery.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execStdOrders(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSqlI.treatTaskTrt(SnpSessTaskSqlI.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(DwgCommandSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
         at com.sunopsis.dwg.cmd.e.i(e.java)
         at com.sunopsis.dwg.cmd.g.y(g.java)
         at com.sunopsis.dwg.cmd.e.run(e.java)
         at java.lang.Thread.run(Unknown Source)
    Regards,
    Krishna

    Hi Krishna,
    What is the datatype of the Variable lastupdate ?
    In my case
    Variable
    Name : LastUpdateDate
    Datatype : Alphanumeric
    Action : Historize
    Query : select to_char(to_date(sysdate,'DD-MON-YY'),'DD-MON-YY') from sys.dual
    Then in filter I used
    EMP.HIREDATE>to_date('#LastUpdateDate','DD-MON-YY')
    Thanks
    Sutirtha

  • Using Select statement in IF condition?

    hi all,
    Can i use select statement in IF COndition in pl sql ?
    eg like- if( select 1 from ASD) then
    end if;

    There is no way to do any kind of select statement inside if conditions.
    Why don't test simple cases like this first?
    An example to show it.
    SQL> begin
      2   if exists (select 1 from dual) then
      3    dbms_output.put_line('ok');
      4   end if;
      5  end;
      6  /
    if exists (select 1 from dual) then
    ERRORE alla riga 2:
    ORA-06550: line 2, column 5:
    PLS-00204: function or pseudo-column 'EXISTS' may be used inside a SQL
    statement only
    ORA-06550: line 2, column 2:
    PL/SQL: Statement ignored
    SQL> begin
      2   if ( (select count(*) from dual) > 0 ) then
      3    dbms_output.put_line('ok');
      4   end if;
      5  end;
      6  /
    if ( (select count(*) from dual) > 0 ) then
    ERRORE alla riga 2:
    ORA-06550: line 2, column 8:
    PLS-00103: Encountered the symbol "SELECT" when expecting one of the following:
    ( - + case mod new not null others <an identifier>
    <a double-quoted delimited-identifier> <a bind variable> avg
    count current exists max min prior sql stddev sum variance
    execute forall merge time timestamp interval date
    <a string literal with character set specification>
    <a number> <a single-quoted SQL string> pipe
    <an alternatively-quoted string literal with character set specification>
    <an alternativ
    ORA-06550: line 2, column 33:
    PLS-00103: Encountered the symbol ")" when expecting one of the following:
    . , @ ; for <an identifier>
    <a double-quoted delimited-identifier> group having intersect
    minus order partition start subpartition union where connect
    SQL> begin
      2   if ( 0 in (select count(*) from dual) ) then
      3    dbms_output.put_line('ok');
      4   end if;
      5  end;
      6  /
    if ( 0 in (select count(*) from dual) ) then
    ERRORE alla riga 2:
    ORA-06550: line 2, column 12:
    PLS-00405: subquery not allowed in this context
    ORA-06550: line 2, column 2:
    PL/SQL: Statement ignoredBye Alessandro

  • Issue in using presentation variable as filter condition in the reports

    Hi,
    I have an issue in using presentation variable as filter condition in my reports the details are as follows:
    Details :
    We want to implement the Max and Min variables through Presentation variables only.we do not want to implement it through session variables in this case.
    We have two variables MIN and MAX to be used as Presentation Variables,for a column of the report (which is a quantity),so that the user wants to see the data for this column within a particular range.i.e the Min and the Max.This part has been implemented well . The issue is when the user wants to see the full data.In that case we will not pass any values to these two Presentation Variable or in other words we are not restricting the report data so we are not passing any value to the variables,this is when the report is throwing the error. we want to leave this variables blank in that case.but this is giving error.
    Please suggest how can I overcome this issue.
    Thanks in Advance.
    Regards,
    Praveen

    i think you have to use guided navigation for this. create two reports first is the one you are having currently and second is the one in which remove the presentation variable from the column formula. i.e. the same report with no aggregation applied.
    Now create a dummy report and make it return value only when the presentation variable value is not equal to max or min. guide the report to navigate between the first and second report based on the result of the dummy report.

  • Which table i can use to find out the condition type in PO item ?

    Hello, erveryone. Which table i can use to find out the condition type in PO item ? Thank you.
    Xinzhou.

    hi
    The Table name used to find the Tax Values are
    KOMV: Pricing Communications-Condition Record
    KONV: Conditions (Transaction Data)
    From the above tables you can refer the fields below.
    KAWRT
    KBETR
    for excise check table J_1IEXCHDR for header
    J_1IEXCDTL for item excise
    Fetch the corresponding records based on the field
    KNTYP
    regards
    kunal

  • ORA-00936: Missing Expression when using a claculation as a condition item

    Hi
    I created a calculation below to create a subtotal on each row of a group of selected items.
    SUM(Invoice Amount)OVER(PARTITION BY Supplier Num ORDER BY Payment Currency Code)
    This worked fine - but then I wanted to create a condition based on this calculation and when I used the calculation as a condition item and reran the report I received the 'ORA-00936: Missing Expression' error. So not too sure why it is fine as a calculation but not as part of a condition.
    We use Discoverer version 4.1
    Am I missing something or is this a bug?
    Any help would be very appreciated
    Thanks
    Marcus

    Thanks for your reply, Rod
    We are using the 9.2.0.5 version of the database
    I am not a SQL expert, by any means, but below is the line that refers to the condition in the sql inspector
    WHERE ( ( E_152 )/2 > 50)
    presuambly that means E_152 is the calculation, I think this may be refering to this at the beginning of the report:
    SELECT DISTINCT E316344 as E316344,E316372 as E316372,E316411 as E316411,E316425 as E316425,E316496 as E316496,E316497 as E316497,E316498 as E316498,E316510 as E316510,E316511 as E316511,E316512 as E316512,E316515 as E316515,E316517 as E316517,E316519 as E316519,E316520 as E316520,E_24 as E_24,E_21 as E_21,E_18 as E_18,E_16 as E_16,E_13 as E_13,E_11 as E_11,E316501 as E316501 FROM ( SELECT E_152 as E_152,DISTINCT E316344 as E316344,E316372 as E316372,E316411 as E316411,E316425 as E316425,E316496 as E316496,E316497 as E316497,E316498 as E316498,E316510 as E316510,E316511 as E316511,E316512 as E316512,E316515 as E316515,E316517 as E316517,E316519 as E316519,E316520 as E316520,E_24 as E_24,E_21 as E_21,E_18 as E_18,E_16 as E_16,E_13 as E_13,E_11 as E_11,E316501 as E316501 FROM ( SELECT DISTINCT i316344 as E316344,i316372 as E316372,i316411 as E316411,i316425 as E316425,i316496 as E316496,i316497 as E316497,i316498 as E316498,i316510 as E316510,i316511 as E316511,i316512 as E316512,i316515 as E316515,i316517 as E316517,i316519 as E316519,i316520 as E316520,SUM(i316501) OVER(PARTITION BY i316345 ORDER BY i316520 )/2 as E_24,( i316501-( NVL(i316502,0) ) )*( NVL(i316522,1) ) as E_21,i316501-( NVL(i316502,0) ) as E_18,NVL(i316502,0) as E_16,i316501*( NVL(i316522,1) ) as E_13,NVL(i316522,1) as E_11,i316501 as E316501,SUM(i316501) OVER(PARTITION BY i316345 ORDER BY i316520 ) as E_152
    Apologies if this info is not that helpful
    Would it have anything to do with the fact that the row calculation is based on several rows (i.e. a subtotal) and if a single row is excluded it would change the value of the other rows within that subtotal group. Maybe it causes some sort of circular issue?
    Anyway, thanks again for your help - hopefully we can resolve it
    Marcus

  • How to use allies names in ON condition

    i have the following query.
    SELECT
    DD.DATE_KEY
    , (SELECT MIN(NVI_DATE) AS NVI_MIN_DATE FROM FCT_SPA_NVI_OUTRIGHT A WHERE A.VENDOR_CODE=V.VENDOR_CODE) AS NVI_MIN_DATE
    , VO.BANK_ACCOUNT_NO
    , VO.BANK_NAME
    , VO.BANK_ROUTING_NO
    FROM DIM_VENDOR V
    LEFT JOIN FCT_SPA_NVI_OUTRIGHT VO
    ON V.VENDOR_CODE = VO.VENDOR_CODE
    LEFT JOIN FCT_SPA_NVI_MERCHANDISE VP
    ON VO.NVI_KEY=VP.NVI_KEY
    LEFT JOIN DIM_DATE DD
    ON VO.NVI_DATE=DD.DATE_FLD
    in the above query, how to use NVI_MIN_DATE in the ON condItion like.,
    LEFT JOIN DIM_DATE DD
    ON NVI_MIN_DATE=DD.DATE_FLD
    Thanks in advance.
    bala krishna

    Try using a CTE, so something like this.
    WITH TableA (NVI_MIN_DATE, BANK_ACCOUNT_NO, BANK_NAME, BANK_ROUTING_NO)
    AS
    SELECT
    (SELECT MIN(NVI_DATE) AS NVI_MIN_DATE FROM FCT_SPA_NVI_OUTRIGHT A WHERE A.VENDOR_CODE=V.VENDOR_CODE) AS NVI_MIN_DATE,
    VO.BANK_ACCOUNT_NO,
    VO.BANK_NAME,
    VO.BANK_ROUTING_NO
    FROM DIM_VENDOR V
    LEFT JOIN FCT_SPA_NVI_OUTRIGHT VO
    ON V.VENDOR_CODE = VO.VENDOR_CODE
    LEFT JOIN FCT_SPA_NVI_MERCHANDISE VP
    ON VO.NVI_KEY=VP.NVI_KEY
    SELECT
    DD.DATE_KEY,
    TableA.*
    FROM TableA
    LEFT JOIN DIM_DATE DD ON
    TableA.NVI_DATE=DD.DATE_FLD
    John Sansom | SQL Server MCM
    Blog |
    Twitter | LinkedIn |
    SQL Consulting

  • Use Japaness words as search condition, but can't retrive data

    Hi,
      I encountered this problem. In report, I use client name as a condition. User can choose a client to
    retrieve data.
       but when user choose a Japanese client name(or other non-English language), can't get data.
       I use the sql genereated by bo to exetute in SQL SERVER2005:
    Select * from m_client where client_local_name = u2019たなかさu2019,no data found,
    but change to  Select * from m_client where client_local_name = Nu2019なかさu2019,can retrieve data.
    Here I use N before the Japanese word
    how to set my DB or set my BO server to solve this issue?
    Best Regards,
    Tony Renjie

    Try this:
    1) Open Designer
    2) File --> Parameters
    3) go to the Parameter tab
    4) add a new value: "UNICODE_STRING"  = "Yes"
    Good luck!

  • Interactive questions using IP/TV

    I am interested in how users can post questions using IP/TV while the presentation is ongoing. What is the process behind this as I don't really see how it works, any kind of insight would be useful.
    Many thanks Alex

    When you set up the program, you can (or not) enable interactive "from the field" questions.
    The client provide a button that can be pressed to flag the presenter that a field question is pending.
    The presenter can then address the questions as possible.
    Depending on the scope and location of the audience, you may also consider bringing up a conference bridge for voice-based questions.
    Good Luck
    Scott

  • How to use OMB to change filter conditions in OWB maps

    Hi,
    I want to know how we can use OMB to change filter conditions in an OWB map.
    As per my scenario i have a filter operator FLTR_1 in my maps and i have to change its filter condition from
    INOUTGRP1.ID IN (1,2)
    AND
    INOUTGRP1.VALUE > CONST_0_MAX_VAL
    to
    INOUTGRP1.ID IN (1,2)
    AND
    INOUTGRP1.VALUE > CONST_6_MAX_VAL
    Just for everybody's information we are migrating from OWB 9.2 to OWB 10.2 and we have called procedures in constants and used their values in filter conditions.OWB 10.2 generates the values for constants in a different way than OWB 9.2 thats why this change is required.I wish to automate the act of changing constant names so we can save time in changing the maps.
    Thx

    Carsten,
    I created a map in OWB 10.2 and ran the following command
    The filter operator name in this map is FILTER
    Carsten Herbe wrote:
    OMBALTER MAPPING 'TEST_MAP' MODIFY OPEARTOR 'FILTER' SET PROPERTIES (FILTER_CONDITION) VALUES ('INOUTGRP1.ID IN (1,2) AND INOUTGRP1.VALUE > CONST_6_MAX_VAL ')
    I got this error:
    OMB02933: Error getting child object of type OPEARTOR with name FILTER: MMM1034:
    Property OPEARTOR does not exist.
    Could you pls help on this.
    Thx

  • Would like to ask 2 questions to a member of

    Hello, I am a client of the Adobe Creative Cloud and I have 2 websites made by “Muse” and hosted by Business Catalyst (http://hymenoptera.businesscatalyst.com/ and http://cpnsittelles.businesscatalyst.com/). I would like to ask 2 questions to a member of the staff:
    1/ I would like to change my email address of subscription, so Adobe told me that I have to cancel my present account and create a new one : would it be still possible to access the websites with the new account and the new email address ?
    2/ The websites are limited to 1 Go. It is enough for one of my websites but it will quickly be insufficient for the first one (hymenoptera) whose principal purpose is to put all my courses to download for my students (I am a teacher). I would like how it is possible to increase the storage space.
    Thank you very much.
    Tanguy

    contact adobe support by clicking here and, when available, click 'still need help', https://helpx.adobe.com/contact.html

  • Which T code is used for entring the pricing condition P101 for purchase or

    which T code is used for entring the pricing condition P101 for purchase order

    Hi jitendra ,
    if you are looking for T-codes use:
    SE16 and scan table TSTCT.
    Regards Mario

  • Distribution Ratio by using local member

    Hi experts,
    I want to create the report contains distribution ratio (%) as follows:
    Precise:
    -Members of the combination of Parent and Children in ITEM dimension are always placed in the report.
    -Of course the number of items and item groups are gradually increasing year by year.
    Then I want to define "ratio" as a local member.
    However, I don't know how to point the cell of aggregate value in the definition of local member such as the row number of "Item Group nn".
    What I had tried is:
    -use EPMPOSITION : not possible
    -use OFFSET function (xls) : not possible
    -etc
    In this case, isn't it possible to realize the report by using local member... Please teach me how to define it.
    Best regards,
    Masa

    Hi Masa,
    To my mind, your requirements can't be solved by local member formula. But it's possible to create dimension member formula for ratio (new ACCOUNT member) using MDX syntax.
    Something like (just description):
    If current member of dimension ITEM is a base member ([CALC]='N') then divide [Qty] by parent ITEM,
    If not - then 1
    Like:
    IIF([ITEM].CURRENTMEMBER.PROPERTIES("CALC")="N",[Qty]/([Qty],[ITEM].CURRENTMEMBER.PARENT),1)
    Vadim

  • Is this now where to ask DVD Studio Pro questions?  If not, please let me know where.  Here's my question:  Using DVD Studio Pro 3, when trying to burn a disc which is 4.5GB, I get error message "Not eough disk space in target folder".  What to do?

    Is this now where to ask DVD Studio Pro questions?  If not, please let me know where.  Here's my question:  Using DVD Studio Pro 3, when trying to burn a disc which is 4.5GB, I get error message "Not eough disk space in target folder".  What to do?

    Thanks.  Unfortunately, I need to make a master DVD that can then be duplicated in bulk as a single layer disc.  This surprises me because I tried burning a different DVD project that has worked in the past which is also 4.5 GB and now I could not burn that either.  I also reencoded some material to get the new project down to 4.4 GB but it still would not burn.  Any ideas are appreciated.

Maybe you are looking for

  • Query Excetion not working for Charactristic restriction

    Hi , I am trying to create one Exception in Query Designer. The requirement is : Report should highlight the data cells where Material Group is "AAAA". Now I created one exception and rectricted to Material Group " AAAA". Now the issue is : It is wor

  • Hotfix KB2830546 for BizTalk Server 2013?

    This is a question for MS: I am a bit puzzled by the fact that a BizTalk Server hotfix is all of a sudden rolled out automatically through Windows Update? Also this hotfix is marked "Important", but reading the description (The verical scroll bar on

  • Unable to create Flat File

    Hi, I am trying to create a flat file source system in BW.When i do that i get an error   ' No entry for BW_USER in table RSADMIN available'.ANy ideas pls?

  • Files to bytes

    i want to store the word document into the data base. how can it be done by converting the word document to bytes and then store the same in the data base.

  • CharacterFormat fails to take values

    I'm finding that CharacterFormat (soon ITextLayoutFormat) fails to take a value of "regular" for fontStyle. This code illustrates the case (attached) On the first run the traces are as expected, setting the text to italic: "existing fontWeight: norma