How to create a custom measure for each level of a dimension

Hi all!
Can Anyone please explain me with an example, how to create a custom measure for each level for a dimension? I dont mine if you use
one or more measures.
thanks in advance
hope someone helps me.

For example:I create a dimension for product_dim witch has 4 levels:total, class, family and item:
d_aben18
n1_aben18
n2_aben18
n3_aben18
n4_aben18
herarchy:h_aben18
cube:cubo_aben18
measure:med_aben18
I create this code to fetch the data to the dimension:
TRAP ON CLEANUP
SQL DECLARE c1 CURSOR FOR SELECT-
total_product_id,1,'N1_ABEN18',total_product_dsc,-
class_id,1,'N2_ABEN18',total_product_id,class_dsc,-
family_id,1,'N3_ABEN18', class_id, family_dsc,-
item_id,1,'N4_ABEN18',family_id,item_dsc-
FROM PRODUCT_DIM
"OPEN THE CURSOR
SQL OPEN c1
"FETCH THE DATA
SQL FETCH c1 LOOP INTO-
:APPEND D_ABEN18, :D_ABEN18_H_aben18_HIERDEF,:D_ABEN18_N1_aben18_LEVELDEF,:D_ABEN18_long_description,-
:APPEND D_ABEN18, :D_ABEN18_H_aben18_HIERDEF,:D_ABEN18_N2_aben18_LEVELDEF,:D_ABEN18_parentrel,-
:D_ABEN18_long_description,-
:APPEND D_ABEN18, :D_ABEN18_H_aben18_HIERDEF,:D_ABEN18_N3_aben18_LEVELDEF,:D_ABEN18_parentrel,-
:D_ABEN18_long_description,-
:APPEND D_ABEN18, :D_ABEN18_H_aben18_HIERDEF,:D_ABEN18_N4_aben18_LEVELDEF,:D_ABEN18_parentrel,-
:D_ABEN18_long_description,-
"SAVE THE CHANGES
UPDATE
COMMIT
CLEANUP:
SQL CLOSE c1
SHOW 'KK2'
Then I create a cube with use compression off, and in rules sum for example.
After, I create a measure and I select Override the aggregation specification for the cube, in rules I put nonadditive and I would like to create aprogram to assign distinct values to each level of the dimension. For example, I put 1, 2 3, and 4 values, but at the end I would like to put count(distinct(values)).
for that I create another program:
VRB D_RETURN DECIMAL
if D_ABEN18_N1_ABEN18_LEVELDEF eq 'N1_ABEN18'
then D_RETURN = 1
if D_ABEN18_N2_ABEN18_LEVELDEF eq 'N2_ABEN18'
then D_RETURN = 2
if D_ABEN18_N3_ABEN18_LEVELDEF eq 'N3_ABEN18'
then D_RETURN = 3
if D_ABEN18_N4_ABEN18_LEVELDEF eq 'N4_ABEN18'
then D_RETURN = 4
else d_return=26
return d_return
"SHOW D_RETURN
cubo_aben18_med_aben18_stored=d_return
but it doesnt work.I dont know how to put to assign or to see what I want.
I report the measure, or I report the program, but then how can I see the values of the measure?
thanks in advance

Similar Messages

  • How to create different log files for each of web applications deployed in OC4J

    Hi All,
    I am using OC4J(from Oracle) v1.0.2.2 and Windows2000. Now I want to know
    1. how to create different log files for each of my deployed web applications ?
    2. what are the advantages in running multiple instances of oc4j and in what case we should run
    multiple instances of OC4J ?
    3. how to run OC4J as Windows2000 Service rather than Windows2000 Application ?
    Thanks and Regards,
    Kumar.

    Hi Avi,
    First of all I have given a first reading to log4j and I think there will some more easy way of logging debugging messages than log4j (If you could provide me a detailed explanation of a servlet,jsp,java bean that uses log4j and how to use log4j then it will be very helpful for me). The other easy ways (if I am not using log4j) to my problem i.e creating different log files for each of web applications deployed in oc4j are
    I have created multiple instances of OC4J that are configured to run on different ports and so on each instance I have deployed a single web application . And I started the 2 oc4j instances by transferring thier error/log messages to a file. And the other way is ..
    I have download from jakarta site a package called servhelper . This servhelper is a thread that is started in a startup servlet and stopped in the destroy method of that startup servlet. So this thread will automatically capture all the system.out.println's and will print those to a file. I believe that this thread program is synchronized. So in this method I need not run multiple instances of OC4J instead each deployed web application on single instance of oc4j uses the same thread program (ofcourse a copy of thread program is put in each of the deployed web applications directories) to log messages on to different log files.
    Can you comment on my above 2 approached to logging debugging messages and a compartive explanation to LOG4J and how to use LOG4J using a simple servlet, simple jsp is appreciated ...
    Thanks and Regards,
    Ravi.

  • How to create an inspection lot for each line item of the Purchase order?

    Hi,
    How to create an inspection lot for each line item of the Purchase order ?
    In detail if possible.

    Hi
       please check this
    [thread|Create Inspection Lot;

  • How to create a "Custom Color" for highlighting? (Acrobat XI)

    March 10, 2014
    How to create a "Custom Color" for highlighting? (Acrobat XI)
    The numbers in the RGB and other fields change as various numbers are changed.
    I wanted to create a pale orange:
    Hue               13      Red      255
    Saturation   240      Green  177
    Luminosity    86       Blue     140
    I'd selected one of the orange squares in the color grid, to display the general orange area of the slider.
    I moved the slider to select a pale orange, which generated the above numbers.   Since this wasn't directly available to save to a Custom Color, I tried to  edit the numbers.  Unfortunately, the other numbers changed, making it impossible to actually create a color.
    Any suggestions would be appreciated.
    Note:  I used Techsmith's Snagit to show screen shots in a Word document.
    When I attempted to browse and upload the file, the error message said "[The content type of this image is not allowed.]"
    OK...what images *are* allowed?

    Hi Don,
    I saw Gilad answered your question in another forum post.
    Do you have everything you need at this point?
    Let me know if you need further assistance.
    Kind regards, Stacy

  • How to create an custom template for cheque printing layout?

    Hi, I have a question about cheque printing format set up in SAP Business One.
    All the the system standard templates in u201CCheque print lay out designeru201Dare u201Ccheque-stub-stubu201D or u201Cstub-cheque-stubu201D or u201Cstub-stub-chequeu201D (three portions). What I need is u201Ccheque-stubu201D (two portions)only. Anyone knows how to create an custom template?
    Thanks.
    Edited by: Angela Zhang on Jan 17, 2010 7:18 AM
    Edited by: Angela Zhang on Jan 17, 2010 7:18 AM

    Hi Angela,
    Check the thread,
    Re: Preprint AP check - stub/check repetitive area fram size
    CHECK PRINTING
    Re: check/cheque for payment printing posting date on stub
    PLD Check-Stub-Stub
    PLD Check
    PLD Multiple Check printing
    Regards,
    Madhan.

  • How to create a custom variable for a Label?

    i need my label to store a string variable in it, do you know i can create a custom variable for it.
    i mean for example if it's name is "StoredString" i can access it in my code by "label1.StoredString" just like "Label1.text" or something like that.

    Thanks for pvdg42's help.
    Hi soorena12,
    Based on your issue, I suggest you can try the pvdg42's suggestion check your issue in your side.
    If it still could not help you solve this issue, I suggest you can tell me which kind of application you create the label in the VS IDE?
    What language you use to create for your application?
    If you have any update message about your issue, please tell us.
    Best Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to create one primary key for each vendor

    Hi all
    i am doing IDOC to jdbc scenario
    i am triggering idoc from R/3 and the data is going into DB table vendor through XI.
    structures are as follows:
    sender side: ZVendorIdoc (this is a customized IDOC , if i triger IDOC for multiple vendors then it triggers only 1 idoc with multiple segment )
    Receiver side:
    DT_testVendor
        Table
            tblVendor
                action UPDATE_INSERT
                access                     1:unbounded
                    cVendorName         1
                    cVendorCode        1
                    fromdate                1
                    todate                    1
                 Key1
                    cVendorName         1
    if i trigger idoc for multiple vendors ,for example vendor 2005,2006 and 2010 . then i can see that the only key comes from the very first field (2005) and the whole record for vendor 2005,2006 and 2010  goes into the table with this(2005) as a primary key
    now again if i send data for these three vendor 2005, 2006 , 2010, in which record for the vendor 2005 is same and for 2006 and 2010 are different than it takes 2005 as a primary key and it does not update the data in the table.
    my requirement is like this:   for each vendor there should be one unique key assigned.
                                              for above said example there should come three keys one for each vendor .
    could you please help me how to do this???????????

    Hi,
      In Mapping Make the statement is 0-unbounded.For each vendor create a statement.This will solve your problem.
    Regards,
    Prakasu.M

  • How to create a custom theme for discussions similar to jive?

    I have worked in Jive earlier and saw that there was greater flexibility in the way you can work with themes. Oracle has extended it and looks most of the features are removed.
    In Jive, I was able to create a new theme and was able to change the look and feel for each piece of page that appeared in jive site. E.g I was able to change the ftl of header, fotter, account controls area etc. There were around 20 diffrent templates that were available and I could control each and every template to give a total diffrent look and feel for the Jive site.
    How do I do the same with Discussions in WLS_Services now? Also don't see an option for defining themes for wiki site.
    Do we have a developer guide for customizing discussions and wikis?
    -Pratap

    Here is someone else's answer.  In short not really.
    https://discussions.apple.com/message/13281848#13281848

  • ADF 11g How to create the custom FilterableQueryDescriptor for adf table

    Can you please let me know on the following.
    1. I am dispalying the adf table using a List from the managed bean
    2. I wanted to filter the table using the filter model.
    3. i wanted to create the sub class of FilterableQueryDescriptor which i can specify. Not finding enough information on how to create and add the information in the setFilterCriteria
    Can you please provide some insight into this topci

    Hello there
    I have the same issue: chaging the background color of some column headers.
    My application is using a custom skinning and when i had headerClass property with a custom class defined in a separate css file, the page generated specified first the class from the skinning and then my new class definition. But my skinning is specifying a background color so the color is not overriden. Any idea?
    ADF code:
    <link type="text/css" rel="stylesheet" href="../../css/pivot.css" id="myStyles"/>
    <af:column headerText="#{level1.userObject.name}"
    headerClass="inputHeader"
    sortable="false" align="center" width="100"
    id="col_level1" >
    Generate HTML code:
    <th align="center" class="xuh inputHeader" afrroot="true" rowspan="2" afrleaf="true" dindex="6" id="pt1:tableId:col_level1" style="">
    <div class="x13t">AEKLF</div>
    </th>
    My CSS file:
    .inputHeader{
    background-color: Red;
    background-image: none;
    color: Black;
    font-weight: bold;
    Thanks for your help !

  • How to create separate log files for each deployed web application in oc4j

    Hi All,
    I am using Windows2000, Oracle9iAS(OC4J). Say I have deployed 3 web applications onto this oc4j server. Then how to create 3 different log files so that I can see the log messages(System.out.println's) of each of these web appliations in a different log file.
    Thanks and Regards,
    Ravi.

    Where do the messages printed via ServletContext.log() go? Is this configurable separately by web application? If so, you could at least replace your System.out.println() with sc.log() statements. For exceptions, you could trap them and log them since the log() method takes a throwable as well as a String.
    John H.

  • How to create a background image for each item in a List object

    Hello.
    I am trying to create a background image that displays whenever a user posts something to a list.  For example when a user posts text it would appear in a list.  The new item in the list would contain a specific background image with the users text appearing on top of the background image.  I do not want a background image for the entire list, rather each item within the list.
    I am not sure how clear this is so I added an image below.  When a user enters text in and clicks the "post-it" button their text would appear below with the sticky note background. 
    I am not sure which list type would be best for this problem or how to create insert the image, so I am open to suggestions. 
    Thank you for your help.  Any advice or guidance will be greatly appreciated!

    Hi
    the easiest way would be with itemRenderer.
    You have to do two things:
    1. In your list declaration use a item renderer: <mx:List itemRenderer="myRenderer"/>
    2. create a flex component myRenderer that will be the single item. This can be a canvas with a background image and a text field on it.
    When you add a new item to the list, a new myRenderer item will be created and the data property will be passed to it. So you have to put "data" in your textField.
    If you need more help try looking at Tour de Flex samples, they're pretty easy.
    Andrei

  • How to create a separate invoice for each delivery line?

    Hello,
    Our customer is requesting a separate invoice for each delivery line. Is there a way to configure this? Or a customization?
    Thanks,
    Joy

    Hello,
    You need to do this through copy controls. in the transaction code VTFL, you need to develop a new routine and attach it in the area "Data VBRK/VBRP"
    attach your custom designed routine and it will split the invoice according to each line item.
    check the standard routines available for hints to develop the routine with your abap. there are several  standard rotuines available
    Hope this helps
    Thanks
    akasha

  • How to create a custom property for web dynpro iView - please respond

    Hi,
    I have to create a custom iView property for a web dynpro Java Application.  I am searching forums and sap help and not able to find any documentation on this. Please post your thoughts here...
    Thanks
    Srini
    Edited by: Srinibapati on Sep 5, 2009 3:56 PM

    No One replied and closing this thread...........I still don't have answer for this.
    Thanks.
    Srini

  • How to create a custom tag for a custom converter

    In Jdeveloper 11g, I have a project where I have created a custom converter class that impements the javax.faces.convert.Converter class. I have registered the converter with an id in the faces-config.xml file of the project, and the converter works fine by using the <f:converter type="myconverter"> tag. However, the custom converter has a field which I would like to set from the tag itself. Hence, I would like to add an attribute to <f:converter> tag if possible or create a custom tag that has the attribute.
    I have done some reserach and I found that a custom tag can be implemented: I need to create a class which extends from the ConverterTag class or javax.faces.webapp.ConverterElTag class, which I did, but I also need to create ".tld" (tag library) file which defines the tag itself.
    The part about creating the ".tld" file and registring the new tag is what I'm not sure how to do.
    Does someone know how to do this?
    thank you

    Hi frank,
    that's a good document, and it explains how to make a custom converter. I already created the custom converter, it converts a number to any currency pattern. I know java already has a currency converter, but it doesn't support Rupee currency format, and I need that format.
    My converter works, but I would like to pass the pattern of the format through an attribute in a tag. Since f:converter doesn't seem to support that, I created a custom tag which uses my converter, and it enables me to pass a pattern to the converter.
    All of that works, but I need to be able to pass the pattern as an EL expression, and it's not evaluating the expression before passing it to the converter. It just passes the whole expression as a string. I'm thinking It may be something I'm doing wrong.
    this is the tag library definition file:
    <!DOCTYPE taglib
    PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
    "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
    <taglib>
    <tlib-version>1.2</tlib-version>
    <jsp-version>2.1</jsp-version>
    <short-name>custom</short-name>
    <uri>custom-currency-converter</uri>
    <description>
    custom currency custom tag library
    </description>
    <tag>
    <name>CurrencyConverter</name>
    <tag-class>
    converter.Tag.CurrencyConverterTag
    </tag-class>
    <body-content>JSP</body-content>
    <attribute>
    <name>pattern</name>
    <type>java.util.String</type>
    <required>true</required>
    <rtexprvalue>true</rtexprvalue>
    </attribute>
    </tag>
    </taglib>
    Edited by: Abraham Ciokler on Feb 4, 2011 11:20 AM

  • How to create a customer program for "PPMOD"feature(pe03)?

    Hi,
    I want to create customer program for "PPMOD"feature(tcode:pe03),who can tell me the steps? (ECC6.0)
    thanks a lot?
    Olivia Yang

    Hi,
    /1PAPA/FEAT610PPMOD the generated program for the feature.
    You are forbidden to change this generated program. Ideally whatever logic regarding the feature needs to be put through pe03 tcode of feature and not in the program.
    Still if there are any changes that need to be done to the program you can enhance the program.
    To enhance the program you need to go to se 38 and open this program and press Shift + F4
    Then Goto->Enhancement operations->Show implicit enhancement operations
    Then go to yellow line right click on mouse and Enhancement implementation->Create
    And put your own code in the implementation.
    Regards,
    Divya

Maybe you are looking for