Have to create logical measure column - Help need

Hi Gurus,
I have a situation like this below. A service request may have activity subtype as breakfix, startup etc. A service request may have only one breakfix or breakfix with additional subtypes like startup etc.
Ex:
Service Request # Activity subtype 2nd subtype
1 breakfix none
2 breakfix startup
3 breakfix none
4 breakfix startup
5 breakfix startup
How do i write a case statement to find out only breakfix as subtype (2) and nbr of service requst with breakfix and other type as 5.
Please guide me how to write.

Your requirement would have been better with an example.
I'm writing actual SQL for ease - you'll need to convert
SELECT        CASE WHEN activity_subtype = 'breakfix' THEN
                               CASE WHEN 2nd_subtype = 'startup' THEN
                                       1
                               END
              END count_breakfix_startup,
              CASE WHEN activity_subtype = 'breakfix' THEN
                               CASE WHEN 2nd_subtype = 'startup' THEN
                                       0
                               ELSE
                                       1
                               END
              END count_breakfix_none
FROM table...You'd need to switch to OBIEE CASE <<expression>> WHEN <<expression>> THEN <<expression>> END syntax. and you will have to hard code every subtype/2nd subtype combination.. (or use a repository variable).

Similar Messages

  • New column based on four logical measure column

    Hi All
    I have four logical measure column which each one indicate how many activity under each service request.
    ie value of each column is
    col1 - 1,
    col2 - 2
    col3 - 3
    col4 - 4 activities or more
    Based on this can i create a new measure column, whenever any service request has two activitiy, my new column should show 2 (ie value col2)
    can i do the max of all the four columns or how to approach this issue?.
    Thanks

    Yes, this is little bit complicated.
    Since there is no direct SQL which extracts the number of activities under each Service Request in the existing setup. They used the nbr of rows in activity in relation to service request table. This way they calcuate the nbr of activities under each SErvice request.
    In the previous request, business want to see how many Service request with one activity or two activties. Because of this, four logical column have been created.
    Now My request need to see service request with one activity or more than one activity measure in the drill report. Since i have already show that nbr of service request with one activity or more than one activity in a chart format.
    Instead of showing all the four measure in my drill report, i want to show if a service request has got one or more than 1 activity.

  • Why we have to create logical key at  levels in Hierarchies

    hi
    i have one doubt that what is the use of logical key at levels in hierarchies directly we can create logical primary key and we can enable for drill down option
    what is the use of creating logical key at levels (what i known is that is for unique column in the logical level)
    i need small example for this
    apart from that why we have to create logical key in logical tables in bmm layer so what is the need of it
    Thanks
    Sreedhar

    hi Sreedhar,
    I suggest you to go through
    http://download.oracle.com/docs/cd/E12103_01/books/admintool/admintool_BusModSetup20.html#wp1005703
    will clarify your doubts :-)
    Thanks,
    Saichand.v

  • Site lookup columns that contain a list with lookup columns help needed

    Here is the theoretical scenario,
    I have a list called Shirts. The list contains name,color, and size columns.
    I have a list called Pants This list contains name, color and size columns as well.
    These two lists are contained at the root level of the site. I created site lookup columns for these two lists and used the name, color and size columns as additional fields on both lookup columns. Lets call these lkupPants and lkupShirts.
    On a sub site I have a list called people. It contains name,date,lkupPants and lkupShirts columns.
    The list looks something like this is dataview:
    Name Date lkupPantsName lkupPantsColor lkupPantsSize lkupShirtName lkupShirtColor lkupShirtSize
    This is the behavior I expected. The additional columns selected in the site lookup columns appear in the list.
    I now create another site lookup column this one is based on the list called people at this subsite level. When creating the site lookup column, the data from lkupPants and lkupShirts are not available.
    How can one create a lookup column that contains list data and any lookup columns contained in the list as additional fields.
    If anyone can see where I am going with this, can they provide another means to accomplish what I am trying to do?
    fr0stsp1re

    create additional columns in people list.  look up values are available in the workflow so populate the additional columns with the values you need.  this will allow you to create another look up column based on this list and all the fields needed.
     just a thought.
    kashif

  • Updating logic studio 8 - help needed!

    Can anyone cleverer than me help me with a problem?
    I bought a second hand mac book pro and it had a copy of logic pro on it that when you opened it asked for the serial number. I had logic plat 6 on my previous mac and I bought the update to studio pro 8, installed it with the xs key in and it all seemed to work fine until i did a software update and tried to launch it again. It just came up asking for the serial no as before which the upgrade version doesn't have on the packaging. I then have to reinstall which again works until i try to update.
    I have tried:
    uninstalling logic using appzapper before reinstalling.
    entering the serial no that is shown when the app is opening up.
    running update with the xs key in.
    none of these have worked and it's starting to get annoying. I think it must be to do with the version that was on the machine when i got it but using appzapper i have no idea how to get rid of it.
    Any help on this would be hugely appreciated.
    thanks in advance.

    It just came up asking for the serial no as before which the upgrade version doesn't have on the packaging.
    You've confused me with this. Are you saying that your Logic Studio Upgrade package doesn't have a serial number? Because it should. Inside the box are several thin documents, one of which is called 'Installing Your Software.' You'll find your serial number on that.
    It's very possible that if you used App Zapper to uninstall the previous LP8 it didn't find the folder that contains the Serial #, and therefore Logic is still running on your friends number. (I just opened LP8 in App Zapper and it didn't find that folder). Go to Your User/Library/Preferences/Logic, and dump the files within that folder. There are Logic preference files in the Preferences folder, but you want to dump the ones *inside the Logic folder within the Preferences folder*.
    You shouldn't have to reinstall Logic to get it to be under your license. Just dump the files mentioned above, start Logic, put in the Serial Number in your package, and then it will be running on yours. You might need the XS key in for that.
    Once it's all squared away, and it's running from your serial number, you should be able to update Logic without the XS Key and without having to put in your Serial Number each time.
    Good Luck!

  • Formula column help needed(urgent)

    Hi ,
    I am using the data template for generating XML data.
    BIP provided functions like SUM(), AVG(), COUNT(), MAX(), etc to use as
    below
    <group name="G_DEPT" source="Q1">
    <element name="DEPT_NUMBER" value="DEPTNO" />
    <element name="DEPTSAL" value="G_EMP.SALARY" function="SUM()"/>
    <group name="G_EMP" source="Q2">
    <element name="EMPLOYEE_NUMBER" value="EMPNO" />
    <element name="NAME" value="ENAME"/>
    <element name="JOB" value="JOB" />
    <element name="SALARY" value="SAL"/>
    </group>
    </group>
    but suppose if I want to do a sum like
    Sum(ALLdebits - All credits - All refunds).
    We use to have formula good old formula column. like in ORACLE Reports...
    below is my query in the data template....can someone please suggest?
    <dataTemplate name="R007" dataSourceRef="xyz">
         <properties>
              <property name="include_rowsettag" value="false"/>
              <property name="include_rowtag" value="false"/>
              <property name="xml_tag_case" value="as_are"/>
         </properties>
         <parameters include_in_output="false">
              <parameter name="DATE_FROM" dataType="varchar2" include_in_output="false"/>
              <parameter name="DATE_TO" dataType="varchar2" include_in_output="false"/>
              <parameter name="BANK_GIRO_NUMBER" dataType="varchar2" include_in_output="false"/>
         </parameters>
         <dataQuery>
              <sqlstatement name="Q1">
                   <![CDATA[SELECT
    DISTINCT
    SYSDATE               todayDate
    ,substr(trim(CR_BG_NO),3,8)              creditorBGNumber
    ,CREDITOR_SHORT_NAME   creditorName
    ,COUNT(*) itemCount
    FROM
    R00777_REPORT R1
    WHERE
    R1.TXN_DATE BETWEEN TO_DATE(:DATE_FROM,'YYYY-MM-DD') AND TO_DATE(:DATE_TO,'YYYY-MM-DD') AND
    R1.CR_BG_NO = :BANK_GIRO_NUMBER
    GROUP BY
    substr(trim(CR_BG_NO),3,8)        
    ,CREDITOR_SHORT_NAME]]>
              </sqlstatement>
              <sqlstatement name="Q2">
                   <![CDATA[
    SELECT
    TXN_DATE
    ,substr(trim(CR_BG_NO),3,8)
    ,PAYMENT_TYPE
    ,TXN_SERIAL_NO
    ,decode(PAYMENT_TYPE,'AGDEBIT_TRANSFER',DR_TXN_AMOUNT,'AG_REFUND',-RE_TXN_AMOUNT,'AGCREDIT_TRANSFER',-CR_TXN_AMOUNT)
    SIGN_AMOUNT
    FROM
    R00777_REPORT R2
    WHERE
    R2.TXN_DATE BETWEEN TO_DATE(:DATE_FROM,'YYYY-MM-DD') AND TO_DATE(:DATE_TO,'YYYY-MM-DD')
    AND R2.CR_BG_NO = :BANK_GIRO_NUMBER
    ]]>
              </sqlstatement>
         </dataQuery>
         <dataStructure>
              <group name="response" source="Q1">
                   <group name="head" source="Q1">
                        <element name="itemCount" value="itemCount"/>
                        <element name="todayDate" value="todayDate"/>
                        <element name="creditorBGNumber" value="creditorBGNumber"/>
                        <element name="creditorName" value="creditorName"/>
                   </group>
                   <group name="list" source="Q2">
                        <group name="listItem" source="Q2">
                             <element name="transactionDate" value="TXN_DATE"/>
                             <group name="transactions" source="Q2">
                                  <group name="transaction" source="Q2">
                                       <element name="transactionType" value="PAYMENT_TYPE"/>
                                       <element name="serialNumber" value="TXN_SERIAL_NO"/>
                                       <element name="amount" value="SIGN_AMOUNT"/>
                                  </group>
                             </group>
                             <element name="netSum" value="transaction.SIGN_AMOUNT" function="SUM()"/>
                        </group>
                   </group>
              </group>
         </dataStructure>
    </dataTemplate>

    Hi Rainer,
    Many Thanks for your reply
    I had done all the calculations in the report view earlier
    and when i accessed it in the data template as follows
    <element name="netSum" value="netSum" />
    the xml output that i got was like
    <R007>
    <response>
    <head>
    <itemCount>8</itemCount>
    <todayDate>2009-02-05T15:50:12.000+01:00</todayDate>
    <creditorBGNumber>01829209</creditorBGNumber>
    <creditorName>ANDROMEDA</creditorName>
    </head>
    <list>
    <listItem>
    <transactionDate>2008-09-03T00:00:00.000+02:00</transactionDate>
    <netSum>-6647999</netSum>
    <transactions>
    <transaction>
    <transactionType>AGCREDIT_TRANSFER</transactionType>
    <serialNumber>5</serialNumber>
    <amount>-1687200</amount>
    </transaction>
    </transactions>
    </listItem>
    </list>
    </response>
    </R007>
    But the output that i want is something like this
    <R007>
    <response>
    <head>
    <itemCount>8</itemCount>
    <todayDate>2009-02-05T15:50:12.000+01:00</todayDate>
    <creditorBGNumber>01829209</creditorBGNumber>
    <creditorName>ANDROMEDA</creditorName>
    </head>
    <list>
    <listItem>
    <transactionDate>2008-09-03T00:00:00.000+02:00</transactionDate>
    <transactions>
    <transaction>
    <transactionType>AGCREDIT_TRANSFER</transactionType>
    <serialNumber>5</serialNumber>
    <amount>-1687200</amount>
    </transaction>
    </transactions>
    <netSum>-6647999</netSum>
    </listItem>
    </list>
    </response>
    </R007>
    Hence I used the BIP built in template function like this
    <element name="netSum" value="transaction.SIGN_AMOUNT" function="SUM()"/>
    but the sum() function is adding up all amounts as expexted,I want
    the above newsum value as
    Sum(AGdebit-AGCREDIT-AG_refund).

  • Drums on Logic Express 8 Help needed

    Hi there,
    I recently brought an imac, purely for my girfriend who writes and records her own music. We have Logic Express 8, and my partner loves it compared to cubase on her old pc! I myself play the drums, and would love to record drums onto this program. I have a real 13 piece kit, with mesh heads fitted to keep the noise down. Recording via a mic is not an option due to noise etc. Is there a way of triggering my drums to get a sound in Logic? I apologise if this sounds crazy, but I am a bit behind on the times! Any help on whether this is possible and what I will need is greatly appreciated!
    Many thanks,
    Keith.

    Their are multiple ways to record drums:
    * firstly, acoustic drums could only be micd, if you are looking to record with what you have, im afraid that's your only option
    *secondly, you could always use a sampler and trigger your drum samples with a midi keyboard, but i hate this method personally
    *thirdly, you could invest in a program such as EZ-Drummer, which has some very nice drum loops all organized by tempo...all you do is simply drag the loop into the arrange window, and if you'd like, you could open the piano roll and manipulate that loop
    *and the fourth (and in my opinion the best) method, is to sell those acoustic drums, and buy yourself an electronic drum kit...you can quantize your notes, you could load any sound sample you want on those pads to get a very diverse range of recordings...and best of all, no microphones! also, volume isn't a problem, if you want to play at 2 in the morning without waking the neighbors, then just through on some headphones and jam away
    im not sure if you wanted to know any of that cause i may of misinterpreted your question, but i tried.

  • Logical measure column

    I created new flag in informatica to identify a service request which fall for certain conditions.
    If the service request fall under conditions and then i will mark as 1. If not then 0.
    I defined this as INT in physical layer.
    and my new logical column is like the following:
    count distinct(Case when service_request_flag = 1 then row_wid else null end)
    When i run the reports, it is pulling the service request which got value zero.
    I am not sure why it is pulling zero service request.
    can any tell me what is the issue. is the data type INT problem?
    Thanks

    HI,
    You said, you changed datatype of that column to int .
    What is the default datatype when you imported from warehouse...??
    And what is the reason that you changed to INT ???
    If you think that this is the problem then,
    you better check by right clicking that column in physical layer and select View Data...
    Is there any error coming while retrieving or did you get the expected results...??
    And as you are putting row_wid.. what you want exactly from this column??
    Please these information ...
    Thanks & Regards
    Kishore Guggilla

  • Creating a web service help needed....

    i am using netbeans 6.0 on xp and hav jdk 1.5 update 17 installed. tomcat 5.5 is also running. when i start developing a web service according to [this tutorial|http://wiki.netbeans.org/SOAPNetBeans6] when i try to create a new web service from wsdl it says "to create web service in this project the java source code level must be atleast jdk 1.5" and i can't continue from there. waht must i do...?

    again, u need to visit to netbeans or jws (java web service) forum within forums.sun.com url

  • Creating a GREP style Help Needed

    I would like to set-up a style using GREP expression(s) that would do the following:
    Everything preceding an em dash (including the em dash and two spaces after the em dash) would be set to bold-italic, AND everything in the paragraph that begins with the word "NOTE:" until the end of the paragraph would be regular-italic.
    Here is a sample of the kind of text I want to format with one style:
    OPERATOR PANEL - The operator panel is located on the right-hand electrical enclosure. NOTE: Not all equipment will have the same operator panel. Refer to schematics for additional information.
    "OPERATOR PANEL - " would be all bold (or bold italic). The body text is regular. the "NOTE: Not all .... " to the end would be regular-italic.
    Any help or direction to a web-site with examples would be appreciated.
    Thanks in advance.
    RPP

    It's easier than you think.
    Peter's suggestion of a regular nesting style might work, except that it's
    i always
    applied to each paragraph you apply it to. That's just what the Grep styles are for:
    i conditional
    stuff.
    The 1st half: Apply Style: Bolded To Text: ^.*? ~=
    (there should be another space after the '=')
    The 2nd half: Apply Style: Italicized To Text: NOTE:.*$
    These are both pretty much basic GREP expressions -- except for the "~=", that's Adobe's --, so just about any google to a GREP repository can explain them. I already knew the basics, but
    this page taught me some new tricks.

  • Creating Inbound IDoc - IDOC_INBOUND_SINGLE Help needed

    Hi all,
    I am using IDOC_INBOUND_SINGLE to create inbound IDoc. Its creating the IDoc and processing successfully.
    But this FM only returns IDoc number and not the processing errors if there are any. Any way to get processing errors also?
    Your help would be highly appreciated.
    Thanks,
    Sagar

    Hi
    I am not sure
    Pls check this function module 'IDOC_READ_COMPLETELY'
    Regards
    Madhan

  • Create logical file path and read it in main program

    Hello Experts,
    My requirement is, I have to read files from application server.
    File path/ Directory is different in different system (systid). i have to read all files starting with (xyz*) from mentioned directory.
    This path i must define in logical path.
    Following are the steps i followed.
    1)   In FILE (TCODE) i have created a logical path and assigned a physical path to it.
    2)   I have created logical file ( I am not sure about this, as i dont have to create logical file, i just need to read file from above path starting with xyz*,  but FM FILE_GET_NAME requires logical file name so i have created it).
    3) I will pass logical file name to FM FILE_GET_NAME and recieve physical file path(with file name which i can ignore).
    these all steps i found on SDN. but its not working.
    FM FILE_GET_NAME is always returning same file path ( Not even close to what i have defined ).
    I can not read data from Table path as it will return physical path as it is, but i need it replaced with system id.
    Any suggestion will be really helpful.
    Thanks in Advance.
    Regards,
    Amar

    Hi Amar,
    one difficulty defining physical path name is to know the right Syntax group.
    For example if you habe OS Linux, you need Syntax Group UNIX here. In Table OPSYSTEM you can see, which OS (OPSYS) needs which FILESYS (Syntax Group).
    If you always get a wrong physical path, this may be caused ba a wrong choice of the Syntax Group. Only the correct one will lead to the correct path.
    Regards,
    Klaus

  • Help needed on Servlets and JSTL

    Hi
    I am using tomcat 5.5 and JDK 1.5. What are the softwares I have to download for compiling servlets and creating JSTL ?. Help needed.
    Thanks
    IndyaRaja

    I tried compling servlet, but it is raising error
    that coul not find package javax.servletWhat I did not mention... you need to add those JARs in the Classpath explicitly. You will find them in %TOMCAT_HOME%\common\lib. You atleast need to add servlet-api.jar to your Classpath. :)

  • Rows to column and need to nvl for that newly  columns

    Hi,
    I have to create  rows to column query in rdf and in turn i have  to created excel rtf template to produce excel output.
    select max(decode (test.role, 'PA-ELT Member', test.full_name )) ELT_MEMBER,
    max(decode (test.role, 'PA-IT Director', test.full_name )) IT_MEMBER,
    max(decode (test.role, 'Project Manager', test.full_name )) Project_Manager,
    TEST.segment1 project_NUMber,
    test.name project_Name,
    test.project_id,
    test.project_type ,
    test.organization_name,
    TEST.project_status_name Status_Name,
    TEST.start_date Start_date,
    TEST.COMPLETION_DATE,
    TEST.Planned_OOE,
    TEST.Planned_Dep,
    TEST.Planned_lab
      from
    (select
    pppv.full_name,
    pppv.role,
    ppa.name,
    ppa.project_id,
    ppa.segment1, 
    ppa.project_type,
    (select name from PA_ALL_ORG_V  where organization_id = ppa.CARRYING_OUT_ORGANIZATION_ID) organization_name,
    ppa.PROJECT_STATUS_CODE,
    pps.PROJECT_STATUS_NAME,
    ppa.START_DATE,
    ppa.COMPLETION_DATE,
    (select N_EXT_ATTR1 from PA_PROJECTS_ERP_EXT_B where project_id = ppa.project_id and ATTR_GROUP_ID = 243) Planned_OOE,
    (select N_EXT_ATTR2 from PA_PROJECTS_ERP_EXT_B where project_id = ppa.project_id and ATTR_GROUP_ID = 243) Planned_Dep,
    (select N_EXT_ATTR3 from PA_PROJECTS_ERP_EXT_B where project_id = ppa.project_id and ATTR_GROUP_ID = 243) Planned_lab
    from
    PA_PROJECTS_ALL ppa, PA_PROJECT_PLAYERS_V pppv, pa_project_statuses pps
    where ppa.project_id = pppv.project_id
    and ppa.PROJECT_STATUS_CODE = pps.PROJECT_STATUS_CODE
    and pppv.role in ('PA-ELT Member','PA-IT Director','Project Manager')
    and ppa.CARRYING_OUT_ORGANIZATION_ID=3994
    )test
    where  1=1
    and TEST.project_type = nvl(:P_PROJECT_TYPE,test.project_type)
    and TEST.project_status_name = nvl(:P_PROJECT_STATUS,test.project_status_name)
    and TEST.segment1 = nvl(:P_PROJECT_NUMBER,test.segment1)
    and TEST.full_name = nvl(:P_ELT_MEMBER, test.full_name)
    and test.full_name = nvl(:P_IT_DIRECTOR,test.full_name)
    and TEST.full_name = nvl(:P_PROJECT_MANAGER,test.full_name)
    group by 
    TEST.segment1,
    test.name,
    test.project_id,
    test.project_type,
    test.organization_name,
    TEST.project_status_name,
    TEST.start_date,
    TEST.COMPLETION_DATE,
    TEST.Planned_OOE,
    TEST.Planned_Dep,
    TEST.Planned_lab
    order by TEST.SEGMENT1
    see ELT_MEMBER,IT_MEMBER and Project_Manager  are columns created from rows to column.
    now if i put where clause for this any columns for Eg: ELT_MEMBER it is giving Elt_member column values alone not remaining IT_member  and Project Manager it show null even it has values .
    it is because of this where clause
    and TEST.full_name = nvl(:P_ELT_MEMBER, test.full_name)
    and test.full_name = nvl(:P_IT_DIRECTOR,test.full_name)
    and TEST.full_name = nvl(:P_PROJECT_MANAGER,test.full_name)
    though i have ELT_MEMBER, IT_member and Project Manager column in where clause i have to call parent sql query column full_name.
    i have tried to have nvl on column like below.
    nvl( max(decode (test.role, 'Project Manager', test.full_name )),(select full_name from PA_PROJECT_PLAYERS_V where project_id = test.project_id and role ='Project Manager')) Project_Manager,
    but it is showing error single -row subquery error .
    it is possible to have a where clause for rows to columns .
    Please help in this regards

    SQL> ed
    Wrote file afiedt.buf
      1  with t as (select 'john,henry,michi,glen' as customer_name, 25000 as credit_limit from dual union all
      2             select 'dilon,bryan', 10000 from dual union all
      3             select 'raymond', 8000 from dual)
      4  -- END OF TEST DATA
      5  select regexp_substr(customer_name, '[^,]+', 1, rn) as customer_name, credit_limit
      6  from   t
      7        ,(select rownum rn
      8          from dual
      9          connect by rownum <= (select max(length(regexp_replace(t.customer_name,'[^,]'))+1) from t))
    10  where regexp_substr(customer_name, '[^,]+', 1, rn) is not null
    11* order by credit_limit desc
    SQL> /
    CUSTOMER_NAME         CREDIT_LIMIT
    john                         25000
    henry                        25000
    michi                        25000
    glen                         25000
    bryan                        10000
    dilon                        10000
    raymond                       8000
    7 rows selected.
    SQL>Just replace "t" with your query to select the data from the external table.

  • Drill on Measure column in Pivot table using Navigation

    Hi,
    We are using INDEXCOL function in Column formula to determine the level of hierarchy to which the user is login in to the Application using the session variable.
    Example:
    INDEXCOL( @{LevelChange}, ISP."Position"."Territory Name", ISP."Position".L1, ISP."Position".L2, ISP."Position".L3, ISP."Position".L4, ISP."Position".L5, ISP."Position".L6, ISP."Position".L7, ISP."Position".L8, ISP."Position".L9)
    Where LevelChange=Presentation variable which gets the value from Session variable.
    Now the issue is:
    We want to have drill down on Measure column and pass the corresponding values like Stage Name,Fiscal Quarter and the level of hierarchy to the next navigated report.
    Is this possible using the implicit feature(navigation on the column value) or we have to use the PortalPage Nav Function.
    Regards

    Just use a session level and set the higher level. The user will have then the possibility to drill down from level 4 to level 5 for instance.
    http://gerardnico.com/wiki/dat/obiee/logical_sql/obiee_indexcol
    The problem with the presentation variable is the scope. You can use it but only in a dashboard, if you open an other report, the presentation service variable is set back to not initialized and you will get the default value.
    An other little thing :
    How do you set the default value ?
    In your formula, I see a presentation variable LevelChange but no default ?
    INDEXCOL( @{LevelChange}, ISP."Position"."Territory Name", ISP."Position".L1, ISP."Position".L2, ISP."Position".L3, ISP."Position".L4, ISP."Position".L5, ISP."Position".L6, ISP."Position".L7, ISP."Position".L8, ISP."Position".L9)

Maybe you are looking for