SSAS KPI Get month to divide by value

Hi,
I'm defining basic KPI's in SSAS.
I have a measure that is a sum of all the documents (acumulated value). I want to divide this value by the month.
Something like:
[Results].[Rub].&[Stock],[Measures].[Value Ac Doc n] -> This is giving the correct value.
If it was to display this value per month:
Month - Value
1- 10
2- 14 (+4)
3- 22 (+8)
Then I want to divide this by the actual month
1- 10/1
2- 14/2
3-22/3
How can I add this to the value expression in the KPI?
Something like the SQL
MONTH function.
Thanks!

If I understand correctly you want to divide your measure value by the month number value.
Depending how the Date Month member value is set you may need the month number attribute to be available for selection in your cube for example [Date].[Monthnumberofyear]..
You can then create a new measure which is the value of you month number.
with member [measures].[month number] as
[Date].[Monthnumberofyear].currentmember.member_value
You then create a new measure which takes your [Measures].[Value Ac Doc n] divided by the [measures].[month number] you have just created
member [measures].[Div Measure] as [Measures].[Value Ac Doc n]/[measures].[month number]

Similar Messages

  • How can I implement a get method that lets me divide two values, Help plz

    I need to implement a method that divides the values return by two other methods but I keep getting an error message, I think its divide by zero error ( I am not too sure on the exact error msg as I do not have java installed on this pc as yet), here is my example,
    I have two get methods that take an int value so say
    getValueOne() as method one
    getValueTwo() as method two
    Now I have a third method that does the following,
    Public int getValueThree() {
    int value =0;
    value = (getValueOne() / getValueTwo())
    return value;
    I am not two sure on the exact code but it does something like this and I get an error. Could someone please guide me how I can successfully implement a get method that divides two values that are returned by two methods.
    Thanks,
    Zub

    Hi, thanks for your reply. Right, how can I go about to throw an exception? I can definitely give the exact code and error message tomorrow when I can access my home pc.
    And you are right there are some values that are zero! I am not very sure what throwing an exception means to be honest. Could you please give an example?
    Thanks...

  • How to get month last date and first date without FM's

    Hi Guru's,
       How can we get  month's first date and last date based on the date given in selection screen without FM's?Is it possible ?
    Like if i give 05-Oct-2008 in the selection screen, i should get the output as 01-Oct-2008 to 31-Oct-2008.Without FM's???
    Regards
    Rakesh.

    Hi Rakesh,
    You can implement this logic as follows:
    You can have two internal tables, one containing the days as numbered 31, 28, 31, and so on with the month number. This holds good if the year is a common year. Another internal table contains days as numbered 31, 29, 31 and so on with the month number. This year would be a leap year.
    An year can be calculated depending on the conditions:
    Say date is given as 20081008
    Concatenate 20081001 + 0(4) into l_date.
    Divide l_date by 4 and remainder should be equal to 0.
    Divide l_date by 400 and remainder should also be equal to 0.
    Then the dominical year will be a leap year.
    Now, if l_date divided by 100 and the remainder is 0 then the year is a common year.
    So depending on this populate the first date and last date from the respective internal table
    Regards,
    Sumalatha N.

  • Getting month

    Hi,
    How do I get Month from creation date.
    If Creation date is 05/01/2004 then I want month as 05.
    Thanks
    Veni.

    Here we are using substrings.  The line of code below means that you what the value starting  four characters to the left,  and the following 2 characters.
    data: month(2) type n.
    month = creation_date+4(2).
    Regards,
    Rich Heilman

  • SFML? What do you get when you divide screen width or height by sprite width or height?

    I am new to game programming and I am constantly seeing people divide the screens width or height by an in game objects width or height. My question is what does the number that they receive stand for. What exactly do you get when you divide the screens
    dimensions by a in game objects dimensions?

    You can calculate how small your object have to be drawn from the original , if you zoom your camera (screen) out and vice versa in 2D.  In 3D you will require  to use matrix transformation instead.
    See this example:
    1) Your original designed dimensions 
           Screen_width_old  ,  Screen Height_old  ,    Sprite_width_old   ,  Sprite_height_old 
    2) After window resizing:
          Screen_width_new  ,  Screen_height_new      (new values)
        Then,  Sprite_height_new=Sprite_height_old * (Screen_height_new / Screen_height_old) ;
       also
        Then,  Sprite_width_new=Sprite_width_old * (Screen_width_new / Screen_width_old) ;

  • How to get all property names and values of an bean instance at runtime?

    How can I get all property names and values of an bean instance at runtime?
    (The class of the bean instance is dynamic and I can not know before I write the code .)

    Look at Class. It has a way to get at all public methods and attributes.
    If you need to get to private attributes you can do what the Introspector does and expect the methods to follow the Bean pattern and pull the attributes out based upon that. Privates are all hidden from direct access but through the Bean Pattern they can be figured out.

  • I am trying to get a hold of the value of a seeded field

    I added a custom region to a seeded page, part of my validation, I should check a value from the seeded page against a value in my region.
    I am trying to get a hold of the value of a seeded field, this is an Oracle selfservice benefits update page.
    The page name is /oracle/apps/ben/selfservice/enrollment/webui/EnrtSelctPG.
    The fields I am looking at are healthplan option name and the selection field-that has the check flag.
    I am unable to find out the name of the fields and unable to figure out how I can get to the two fields to check their values.
    Can someone please assist?
    Thank you,

    I am trying to validate when the user click next.
    Compare values from my custom region and a value in a nested seeded region. This is the first tme I am trying to get a hold of a seeded field on the seeded page.
    I created stand alone region before, but never compared values and validated Oracle seeded fields.So I am not sure how to go about it.
    Thanks,

  • Get month from a date column ina table

    Hi
    I have a table that consists of one column of date data type. For example it stores mm/dd/yyyy.
    I want to get all the records from this table where month = 12. for the year 2000.
    I saw the extract function. However That is used while selecting. How can I give a condition in where clause:
    select date_col
    from dates-table
    where <get month for date_col> = december or 12
    and year = 2000???

    Ok that certainy helps.
    This is what I am trying to do.
    I have a procedure to which I am passing the date_param (of date data type).
    declare
    my_month date;
    begin
    select to_char(date_param,'MM') into my_month from dual;
    select date_col from dates-table where to_char(date_col,'mm')= my_month and some_indicator='Y';
    end;This will return me one date where the indicator is set to Y.
    For example date_param is passed as 01/01/2000.
    select to_char('01/01/2000','MM') from dual;I get the error when I run the above. I get an error saying invalid number.

  • How to get rid of the residual value in my account

    hi
    i have 1 kr in my itunes accout and i need to change my country but i cant , what i do to get rid of the remaining value .
    thank you

    If you can, enter in a credit card from your original country temporarily so you can buy something that costs more than the balance remaining on your account and thereby use up all the remaining credit. If you cannot or do not wish to put in a credit card, go here:
    http://www.apple.com/support/itunes/contact/
    and follow the instructions to report the issue to the iTunes Store. They can probably clear your remaining balance for you.
    Regards.

  • We are trying to do a Quick payment from payment workbench and getting 'FRM-41830: List of values contains no entries' error for payment document column/field. Payment document setup looks good. Not sure what the issue is.

    We are trying to do a Quick payment from payment workbench and getting 'FRM-41830: List of values contains no entries' error for payment document column/field. Payment document setup looks good. Not sure what the issue is.

    Already gone through following three notes but didn't found resolution.
    APXPAWKB: FRM-41830 When Clicking on Payment Document LOV (Doc ID 1081305.1)
    R12: APXPAWKB: Payment Document Lov Is Empty When Entering A Payment (Doc ID 857587.1)
    R12: Payment Workbench Error: FRM-41830 List Of Values Contains No Entries (APXPAWKB.FMB) (Doc ID 1323875.1)

  • I am trying to export the combained PDF based on BOOK opetion using below scripts. but i am getting following error message "Invalid value for parameter 'to' of method 'exportFile'. Expected File, but received 1952403524". anyone knows, please suggest me

    Dear ALL,
    i am trying to export the combained PDF based on BOOK opetion using below scripts. but i am getting following error message "Invalid value for parameter 'to' of method 'exportFile'. Expected File, but received 1952403524". anyone knows, please suggest me solutions.
    var myBookFileName ,myBookFileName_temp;
                    if ( myFolder != null )
                            var myFiles = [];
                            var myAllFilesList = myFolder.getFiles("*.indd");    
                            for (var f = 0; f < myAllFilesList.length; f++)
                                        var myFile = myAllFilesList[f]; 
                                        myFiles.push(myFile);
                            if ( myFiles.length > 0 )
                                        myBookFileName = myFolder + "/"+ myFolder.name + ".indb";
                                        myBookFileName_temp=myFolder.name ;
                                        myBookFile = new File( myBookFileName );
                                        myBook = app.books.add( myBookFile );  
                                       myBook.automaticPagination = false;
                                        for ( i=0; i < myFiles.length; i++ )
                                                   myBook.bookContents.add( myFiles[i] );             
                                        var pdfFile =File(File(myFolder).fsName + "\\"+myBookFileName_temp+"_WEB.pdf");
                                        var bookComps = myBook.bookContents;
                                        if (bookComps.length === 1)
                                                       bookComps = [bookComps];
                                         var myPDFExportPreset = app.pdfExportPresets.item("AER6");
                                        app.activeBook.exportFile(ExportFormat.PDF_TYPE,File("D:\\AER\\WEBPDF.pdf"),false,myPDFEx portPreset,bookComps);
                                      //myBook.exportFile (ExportFormat.pdfType, pdfFile, false);
                                      //myBook.exportFile(pdfFile, false, pdfPref, bookComps);
                                        myBook.close(SaveOptions.yes);      

    Change the below line:
    app.activeBook.exportFile(ExportFormat.PDF_TYPE,File("D:\\AER\\WEBPDF.pdf"),false,myPDFExp ortPreset,bookComps);
    to
    app.activeBook.exportFile(ExportFormat.PDF_TYPE,File("D:\\AER\\WEBPDF.pdf"),false,myPDFExp ortPreset);
    Vandy

  • How to get the object class field value in CDHDR table for vendor

    hi
    how to get the object class field value in CDHDR table for vendor

    Try KRED/KRED_N as object class in CDHDR for Vendor.

  • How to get the latest credit limit values per each customer in the report.

    Hi All,
    Can anybody give me an idea on how to get the latest credit limit values per each customer in the report.
    I have below requiremnt.
    I have cube which is having transactional data on document and customer level .and it also having master data info object in the cube which is credit management view having all the customer numbers .
    This credit management view is master data info object having credit limit key figure as attribute.These credit limit are per each customer.
    So we need these credit limits in the report as dynamic values .(I mean whatever be the current credit limit in the master data table for that paricular customer that should show up in the reporting).
    one more thing these credit limits should roll up correctly at the HTR level.
    One HTR having number of customers .
    for example HTR 100 can have customer number 200,300,400.
    Those 200,300,400 customer credit limits should roolup correctly at the HTR 100 level.
    Example below :
    Cube DATA :
    HTR Customer Doct number Credit managment view
    100 200 10001 200
    100 200 10002 200
    100 300 10004 300
    100 300 10005 300
    100 400 10006 400
    100 400 10007 400
    100 400 10008 400
    Master data tabel (P Table)(Credit managment view)
    Credit managment view Credit limits
    200 1000.00
    300 50000.00
    400 90000.00
    Please remeber :
    We can not make these credit limits as navigational becasue these are keyfigure attributes not characteristics.
    one more thing we can not make them as charatistics because we need use these credit limits to derive other calkculation. so it is not possibel to derive calculations on charactristics .

    Create a formula variable of type replacement path with reference as attibutes of Credit management view and choose your key figure credit limit,say zcredit.
    Now create a formula or CKF and use zcredit.
    This should display the credit limit in your report as normal key figure.
    I didnot get this part "one more thing these credit limits should roll up correctly at the HTR level.", may be the above will solve this too.Try it.
    Hope this helps.

  • How can I get the variable with the value from Thread Run method?

    We want to access a variable from the run method of a Thread externally in a class or in a method. Even though I make the variable as public /public static, I could get the value till the end of the run method only. After that scope of the variable gets lost resulting to null value in the called method/class..
    How can I get the variable with the value?
    This is sample code:
    public class SampleSynchronisation
         public static void main(String df[])
    sampleThread sathr= new sampleThread();
    sathr.start();
    System.out.println("This is the value from the run method "+sathr.x);
    // I should get Inside the run method::: But I get only Inside
    class sampleThread extends Thread
         public String x="Inside";
         public void run()
              x+="the run method";
    NB: if i write the variable in to a file I am able to read it from external method. This I dont want to do

    We want to access a variable from the run method of a
    Thread externally in a class or in a method. I presume you mean a member variable of the thread class and not a local variable inside the run() method.
    Even
    though I make the variable as public /public static, I
    could get the value till the end of the run method
    only. After that scope of the variable gets lost
    resulting to null value in the called method/class..
    I find it easier to implement the Runnable interface rather than extending a thread. This allows your class to extend another class (ie if you extend thread you can't extend something else, but if you implement Runnable you have the ability to inherit from something). Here's how I would write it:
    public class SampleSynchronisation
      public static void main(String[] args)
        SampleSynchronisation app = new SampleSynchronisation();
      public SampleSynchronisation()
        MyRunnable runner = new MyRunnable();
        new Thread(runner).start();
        // yield this thread so other thread gets a chance to start
        Thread.yield();
        System.out.println("runner's X = " + runner.getX());
      class MyRunnable implements Runnable
        String X = null;
        // this method called from the controlling thread
        public synchronized String getX()
          return X;
        public void run()
          System.out.println("Inside MyRunnable");
          X = "MyRunnable's data";
      } // end class MyRunnable
    } // end class SampleSynchronisation>
    public class SampleSynchronisation
    public static void main(String df[])
    sampleThread sathr= new sampleThread();
    sathr.start();
    System.out.println("This is the value from the run
    method "+sathr.x);
    // I should get Inside the run method::: But I get
    only Inside
    class sampleThread extends Thread
    public String x="Inside";
    public void run()
    x+="the run method";
    NB: if i write the variable in to a file I am able to
    read it from external method. This I dont want to do

  • How can I get the variable with the value from Thread's run method

    We want to access a variable from the run method of a Thread externally in a class or in a method. Even though I make the variable as public /public static, I could get the value till the end of the run method only. After that scope of the variable gets lost resulting to null value in the called method/class..
    How can I get the variable with the value?
    This is sample code:
    public class SampleSynchronisation
         public static void main(String df[])
    sampleThread sathr= new sampleThread();
    sathr.start();
    System.out.println("This is the value from the run method "+sathr.x);
    /* I should get:
    Inside the run method
    But I get only:
    Inside*/
    class sampleThread extends Thread
         public String x="Inside";
         public void run()
              x+="the run method";
    NB: if i write the variable in to a file I am able to read it from external method. This I dont want to do

    Your main thread continues to run after the sathr thread is completed, consequently the output is done before the sathr thread has modified the string. You need to make the main thread pause, this will allow sathr time to run to the point where it will modify the string and then you can print it out. Another way would be to lock the object using a synchronized block to stop the main thread accessing the string until the sathr has finished with it.

Maybe you are looking for