MDX - Int function

How to use INT() function with mdx?
I'm trying to run the Int(104.504) function from EAS (essbase administration services console - file\editors\mdx script editor), exactly the same that is in the Oracle tech ref guide, but I keep getting a sintax error. What am I doing wrong?

You're welcome - that's interesting.  This works for me in Sample.Basic:
WITH MEMBER Measures.TestFunction AS 'Int(Sum(Children([Profit])))'
SELECT {Measures.TestFunction} ON COLUMNS
FROM Sample.Basic
I think Essbase doesn't like the multiple levels in your WITH specification.  Measure.Profit.TestFunction doesn't work for me either, for example.
The WITH clause sets up a 'virtual' member - it makes sense to think of it as belonging to a dimension, but it doesn't really make sense to think of it as having any particular position in that dimension.  Even if it was valid syntax, there would be no difference between Measures.TestFunction and Measures.Profit.TestFunction.  Metadata functions such as Parent don't work with calculated members - at least, not according to the MDX With Section entry in the Technical Reference.

Similar Messages

  • INT function in VB6

    Hello,
    I am not sure that  this is the correct place to put VB6 question or not,
    If not please suggest me correct one.
    My Question:
    Can any one explain me how INT function works internally for double type data in below case?
    Eg.  Dim dblVal as Double
    dblVal = 3.275
    TextBox1.Text = Int(dblVal * 100 * 10)
    Problem :  dblVal * 100 * 10 gives me 3275 but Int(dblVal * 100 * 10) give me 3274.

    "Problem :  dblVal * 100 * 10 gives me 3275 but Int(dblVal * 100 * 10) give me 3274."
    That's because the Int() function truncates the fractional part of the result. You may think the result of evaluating dblVal * 100 * 10 is exactly 3275, but in a computer, real numbers are approximations. The internal result may be 3274.99999, and the Int()
    function gets rid of the .99999.
    As far as VBB6 questions are concerned, VB6 is long out of support and no MSDN forums support VB6. Other sources of VB6 help:
    http://forums.codeguru.com/forumdisplay.php?4-Visual-Basic-6-0-Programming

  • How to optimize a MDX aggregation functions containing "Exists"?

    I have the following calculated measure:
    sum(([D Player].[Player Name].[All],
    exists([D Match].[Match Id].children,([D Player].[Player Name].currentmember,[Measures].[In Time]),"F Player In Match Stat" ))
    ,[Measures].[Goals])
    Analyzing this calculated measure (the one with "nonempty") in MDX Studio shows "Function
    'Exists' was used inside aggregation function - this disables block computation mode".
    Mosha Pasumansky spoke about this in one of his posts titled "Optimizing
    MDX aggregation functions" where he explains how to optimize MDX aggregation functions containing "Filter",
    "NonEmpty", and "Union", but he said he didn't have time to write about Exists, CrossJoin, Descendants, or EXISTING (he posted this in Oct. 2008 and the busy man didn't have time since that date :P )... so anyone knows an article that continues
    on what Mosha miss or forgot? how to optimize a MDX aggregation function containing "Exists"? what can I do to achieve the same as this calculated measure but in block mode not cell-by-cell mode ?

    Sorry for the late replay.
    I didn't check if your last proposed solution is faster or not, but I'm sorry to say that it gave the wrong result, look at this:
    Player Name
    Players Team
    Goals Player Scored with Team
    A
    Team's Goals in Player's Played Matches
    Lionel Messi
    Argentina
    28
    28
    110
    Lionel Messi
    Barcelona
    341
    330
    978
    The correct result should be like the green column. The last proposed solution in the red column.
    If you look at the query in my first post you will find that the intention is to find the total number of goals a team scored in all matches a player participated in. So in the above example Messi scored 28 goals for Argentina (before the last world cup:)
    )  when the whole Argentinian team scored 110 goals (including Messi's goals) in those matches that Messi played even one minute in.

  • MDX Properties function

    I use ADOMD/MDX to query data against SAP BW.
    Can any BW expert answer me whether BW support MDX Properties function. That is, Does BW support a MDX as following:
    Select Filter([CProduct].Members,[CProduct].CurrentMember.Properties("2CCOLOR")="RED") On Columns From [$CSale]
    Thanks in advance.

    In NW you can't use property values in equations...the answer is to hard code in the logic or use a BADI to retrieve the property value and execute the equation.  Please see my answer to the following threads
    [Re: Select Distinct]
    [Re: Script logic question]

  • Essbase MDX - string functions are not working!

    Hi all!
    this MDX code works fine (LEN function):
    With
    member Scenario.MS1 as 'Len([Account].currentmember.member_name)'
    select { Scenario.MS1} on columns from http://Planing.Budget
    this code raises error (UPPER or any string function):
    With
    member Scenario.MS1 as 'Upper([Account].currentmember.member_name)'
    select { Scenario.MS1} on columns from http://Planing.Budget
    The administration tool I am using is for version 11.1.1.3 ..
    why? O_o
    Edited by: serzzzh on 14.10.2009 22:54

    Unless maybe if you're using J2ME and have very tight memory requirements (are you?) either an array or a Vector should be fine to hold 8000 strings.
    So I'm guessing, either:
    1) you're using J2ME, have a device with tight memory, in which case you probably need a redesign, either to move data off the device and into an online service or the like, or possibly to use the record db system that's in one of the J2ME profiles (although 8000 seems like a lot of stuff to put in such a small form factor device).
    2) the strings are in fact enormous, in which case array-or-vector isn't the issue
    3) there's some other problem. maybe you have a runaway recursive method or something.

  • How create filter in olap universe with MDX LIKE Function

    Hi all
    I need to create a filter in a olap universe with the LIKE MDX function.
    Problem:
    There is a dimension with account numbers whit 10 digits like this: 5683492703 and i need to create a filter whit all account numbers whit the number 7 in the sixth position in a olap universe.
    How to do this?
    Thanks all

    Try like this :
    <FILTER KEY="[Level Object Definition]">
         <CONDITION OPERATORCONDITION="Like">
              <CONSTANT CAPTION="_____7*"/>
         </CONDITION>
    </FILTER>
    Not sure if it is _ or ? to represent a single character. Try ? in place of _ if the above code doesn't work.
    Regards

  • MDX Rank function

    I am having some trouble getting expected results when using the RANK function. My MDX is below with the result set that gets created. 
    The [SF OCC Rank] results are correct but the [Net Rentals Rank] is not.  I am wanting to rank each of the measures to be able to identify which Site is ranked highest in [SF Occ %] and then which site is ranked highest in [Net Rentals].
    My data has in total 43 sites.  In my filter I am limiting it to the Sites in [Site Groups].[Site Group Name].&[12].  There are only 14 sites that should display.  It looks like the [Net Rentals Rank] is ranking all 43 sites instead of
    just the 14 that I am wanting. 
    Any help is greatly appreciated.  Thanks!
    WITH
    MEMBER [Measures].[SF Occ Rank] as RANK(([Unit].[Site Name].CurrentMember),ORDER(([Unit].[Site Name].[Site Name].Members),[Measures].[SF Occ %], BDESC))
    MEMBER [Measures].[Net Rentals Rank] as RANK(([Unit].[Site Name].CurrentMember),ORDER(([Unit].[Site Name].[Site Name].Members),[Measures].[Net Rentals], BDESC))
    select {[Measures].[SF OCC %],[Measures].[SF Occ Rank],
               [Measures].[Net Rentals], [Measures].[Net Rentals Rank]} on COLUMNS,
        filter( [Unit].[Site Name].[Site Name].Members,[Site Groups].[Site Group Name].&[12]) on ROWS
    from [CUBE]
    where ( [Date].[Calendar].[Month of Year].&[201412],[Site Groups].[Site Group Name].&[12])

    Hi rocko,
       You are correct the Net Rentals Rank will be calculated for all the Sites and will display the result for the current Sites being selected. Do some changes to the query so that you will get the ranks for only the sites you selected. 
    WITH
    MEMBER [Measures].[SF Occ Rank] as RANK(([Unit].[Site Name].CurrentMember),ORDER(([Unit].[Site Name].[Site Name].Members),[Measures].[SF Occ %], BDESC))
    MEMBER [Measures].[Net Rentals Rank] as RANK([Unit].[Site Name].CurrentMember,ORDER( Exists( [Unit].[Site Name].[Site Name].Members,[Site Groups].[Site Group Name].&[12]),[Measures].[Net Rentals], BDESC))
    select {[Measures].[SF OCC %],[Measures].[SF Occ Rank],
               [Measures].[Net Rentals], [Measures].[Net Rentals Rank]} on COLUMNS,
        Exists( [Unit].[Site Name].[Site Name].Members,[Site Groups].[Site Group Name].&[12]) on ROWS
    from [CUBE]
    where ( [Date].[Calendar].[Month of Year].&[201412],[Site Groups].[Site Group Name].&[12])
    Regards,
    Venkata Koppula

  • MDX + Generate function

    Hi all,
    I have query below which works and I understand the output. However, if I remove the Generate I also get the top 5 products per country, descending order, but the Order amounts or not the same and thus not correct. 
    My question, what does the generate actually do to make it a different output?
    WITH SET [5MostInternetOrderedProductsByCountry] AS
    GENERATE([Customer].[Customer Geography].[Country].Members, 
     CROSSJOIN([Customer].[Customer Geography].CurrentMember, 
    HEAD(
    ORDER([Product].[Product].[Product].Members, 
    [Measures].[Internet Order Count],BDESC),
    5)
    SELECT 
          {[Measures].[Internet Order Count]} ON COLUMNS,
          {[5MostInternetOrderedProductsByCountry]} ON ROWS 
    FROM
          [Adventure Works]
    Thanks in advance for helping!

    Hi,
    Generate( Set_Expression1 ,  Set_Expression2 [ , ALL ]  )
    Applies a set to each member of another set, and then joins the resulting sets by union.
    If a second set is specified, the Generate function returns a set generated by applying the tuples in the second set to each tuple in the first set, and then joining the resulting sets by union. If
    ALL is specified, the function retains duplicates in the resulting set.
    Generate (MDX)
    Regards,
    Charlie Liao
    TechNet Community Support

  • MDX 'TopPercent' function

    The Essbase Tech Reference gives the following MDX code as an example of the TopPercent function:
    SELECT
    CrossJoin(
    *[Product].[Diet].Children,*
    *[Year].Children*
    ON COLUMNS,
    TopPercent(
    *[Market].Levels(0).Members,*
    *25,*
    *[Product].[Diet]*
    ON ROWS
    FROM Sample.Basic
    *WHERE ([Scenario].[Actual],*
    *[Measures].[Sales])*
    The output of this is supposed to give us the markets that make up 25% of sales for all products under "Diet". In the example, Illinois, California and Colorado are shown as being the markets that make up 25% for all products under "Diet". This strikes me as a unrealistic, i.e. how is it that only these three states always make the top 25% ? What would the output be if New York was in the top 25% for just one of the products, say Diet.200-20? How would this be captured in the output? Would the output contain a fourth row for New York and only have a value in one cell, i.e. NewYork->200-20->Sales ?
    Appreciate any thoughts on this..
    thanks,
    Axe

    Hi Brian, i do not have experience in using MDX in EVDRE but i HAVE used it for EVEXP.
    Essentially we use the filter parameter of the EVEXP to supply the MDX statement i,e:
    (([ACCOUNT].[INPUT_FLG],[CATEGORY].[GROUP1],[DATASRC].[INPUT],[INTCO].[Non_InterCo],[RPTCURRENCY].[LC],[MEASURES].[YTD],[TIME].[FY10.M1])<>0)
    if you require an example of returning top 10 or something similar please let me know, but i believe the document you are refering to has some examples.
    If your question only MDX in context of EVDRE then, i hope an expert can inform me also as i am not aware of such functionality. I assumed the scope of the document was regarding 'filters' in EVEXP.
    Please let me know how you get on.

  • MDX AGGREGATE FUNCTION FOR UNIVERSE DESIGNER

    Hallo Friends,
    I'm trying to get the summatory of a meassure in Universe Designer for a certain period of time, and I think I can make it with the function AGGREGATE MDX but it always results in an error, I've tried to make it in some different ways but I have again an error. Could somebody please help me with an example of this function in Universe Designer.
    Thanks in advance!

    Hi,
    It's probably (definitely) easier to do this in the Bex layer, but here are some useful samples for you to digest:
    https://www.sdn.sap.com/irj/boc/index?rid=/library/uuid/c0a45246-ce76-2b10-e688-f5c8206203eb&overridelayout=true
    regards,
    H

  • MDX IsLeaf Function for the Hierarchy Member

    Hi Guys
    Could you share your knowledge about the behaviour of SSAS for this MDX query Please ?
    A similar query about the below takes less than a sec to complete with a particular member. However with different member (Parent Member of a Hierarchy), it is running forever and I killed the query.
    The profiler shows the event “Query Cube Begin” then nothing happens and I don’t see any event at all. Also I am the only user connected with the SSAS cube.
    Could you share your thoughts to investigate this issue ?
    Please let me know, if you need any more information.
    Similar MDX Query:
    With
    Member [Measures].[IsLeafFlag]
    as
    IsLeaf([Customer].[Customer Geography].[Country].[Canada])
    Select [Measures].[IsLeafFlag]
    on Columns
    from [Adventure Works]

    Hi SQLguy,
    I have tested it on my local environment in AdventureWorks cube, and we cannot reproduce this issue. The query return the result in less than a second no matter which member in IsLeaf function.
    IsLeaf (MDX)
    Returns whether a specified member is a leaf member.
    Argument
    Member_Expression
    A valid Multidimensional Expressions (MDX) expression that returns a member.
    In your scenario, the query run forever when putting a parent member of a hierarchy into IsLeaf function, please ensure that this is a valid member.
    Regards,
    Charlie Liao
    If you have any feedback on our support, please click
    here
    Charlie Liao
    TechNet Community Support

  • MDX filter function doesn't work properly

    hi, 
    the filter that I'm using in my query is not working properly and i don't see what i'm missing, i tried to convert to double with CDbl function, but i got the same result. 
    the query : 
    SELECT NON EMPTY 
         [Measures].[Montant - Fact Ventes]
        ,[Measures].[QQT - Fact Ventes]
    } ON COLUMNS,
    NON EMPTY 
        ([Dim Date].[Year].&[2014],[Dim Date].[MonthOfYear].&[7],[Dim Date].[Date].[Date])
        FILTER
         [DIM FA Clients].[FaCuNumberX].members,
         CDbl([Measures].[QQT - Fact Ventes])=0
    } ON ROWS
    FROM [CubeAll]
    the result : 
    thank you!

    Hi Merouane,
    I think your filter is working correctly, just not the way you expect.
    The filter is filtering Clients that have a non zero Ventes, THEN it is multiplying it by the dates.  So, as long as the client has some ventes, it will be included.  To only show rows with a non zero ventes try something like
    SELECT NON EMPTY 
         [Measures].[Montant - Fact Ventes]
        ,[Measures].[QQT - Fact Ventes]
    } ON COLUMNS,
    NON EMPTY 
     FILTER(
       {[Dim Date].[Year].&[2014]}
         *{[Dim Date].[MonthOfYear].&[7]}
          *{[Dim Date].[Date].[Date]}
        * {[DIM
    FA Clients].[FaCuNumberX].members},
         CDbl([Measures].[QQT - Fact Ventes])=0
     ON ROWS
    FROM [CubeAll]
    Richard

  • MDX - MIN Function Help

    I just have 2 dims (Measures and Segment). The below formula is on my Measurs member 'Min $/Yd'. My data is loaded to 'Dollars' member.
    When I retrive on spreadsheet the below MDX gives me the MIN of the entire Segment dimension rather than the MIN of all the level zero members of the parent I'm currently retrieving on. Any ideas what I did wrong?
    Min(
    Filter ( CurrentMember( [Segment] ).levels(0).Members,
    [Dollars] <> Missing ),
    [Measures].[Dollars]
    )

    Answere was that you can't use 'Levels 0' as that defaults to the dim level. Thus it should be:
    Min(
    Filter ( Leaves( [Segment] ).CurrentMember,
    [Dollars] Missing ),
    [Measures].[Dollars]
    )

  • MDX UDA function

    Here are my dimensions in ASO cube
    Account
    xyz
    Time Periods
    FY10
    FY10_Jan (UDA: Jan1)
    FY10_Feb (UDA: Feb1)
    and so on..
    Time View
    FebCalc
    I'm puting a formula in the FebCalc to calculate the sum of FY10_Jan and FY10_Feb using the UDAs dynamically so I don't have to hard code in the members. This is the formula : SUM({UDA([Time Periods],"Jan1"), UDA([Time Periods, "Feb1")}). I'm getting the syntax error. I can't figure out where it's wrong. Any help is appreciated!

    May I know the error??
    +SUM({UDA([Time Periods],"Jan1"), UDA(_[Time Periods_, "Feb1")})+
    End brace is missing for the _[Time Periods]_ in the second argument of SUM.
    That can be the reason.
    Regards

  • MDX substring function

    Hi all,
    I am trying to use select {Substring([Q1W01],1,4)} ON COLUMNS FROM [test].[db]
    But it throws syntax error. What am I doing wrong?
    Essbase 11.1.2.2
    Many thanks.

    What are you trying to accomplish?
    Are you trying to retrieve a member [Q1W0] or are you trying to retrieve all members that begin with "Q1W0" or are you trying to retrieve member [Q1W04] but you want to rename it in the report to show as "Q1W0"?
    If you want to return members that start with Q1W0 then you need to do the following
    SELECT
    {FILTER({[Time].members},
         Substring([Time].CurrentMember.Member_Name, 1, 3) = "Q1W0")} ON COLUMNS
    FROM [test.db];

Maybe you are looking for

  • Can anyone tell me why iTunes don't let me drag&drop DTS files?

    hello, can anyone tell me what should I do to be able to play DTS audio files with iTunes (Windows 7). I connected my PC (via optical output) to a 5.1 receiver and everything is ok until I try to drag&drop DTS audio files to iTunes and try to playing

  • How to read file in sync.?

    Hi all, I am using URLLoader to read file, but it has trouble/problem that is need to wait the load complete event to finish read file action. So i cannot use it to load file to read some configuration file to assign to the class variables. I want to

  • Question about backing up imported music

    after importing cds to my itunes library, can i delete the songs from my hard drive but still be able to put those same songs (imported into library)onto my ipod. or do i need to keep the songs until i have them transfered on my ipod i'm asking becau

  • CQ45-144TX Bluetooth Driver

    I have just re-formatted the drive and reinstalled the Vista OS with the recovery CD created long time ago. Everything is going smooth except that I can't get the bluetooth to work now, it is off all the time as I have seen in Wireless Assistant no m

  • Is this vista 2012 a scam or real?

    Vista 2012 is on my computer system. It started out as non-stopping pop-ups. My credit card was charged $59.95 and the HBC account picked it up as a scam. Not sure what to do now as it is now on my computer icons-