[Essbase] - using TopCount MDX  function

Hi,
I would like to use the TopCount MDX function in an ASO cube.
I did manage to write the MDX query but did not find how to "convert" it as a MDX formula on the "MEASURE" dimension (well I am guessing).
I thank you for your help!
Thomas
MDX query :
IND_HITS is from the MEASURE dimension
A2008 is from the YEAR dimension
M1013210 is from the MESSAGE dimension
SELECT
[MOIS].Generations(1).Members
ON COLUMNS,
TopCount([USERS].Children,10, [IND_HITS] )
ON ROWS
FROM Cube_Log.Cube_Log
WHERE ([A2008], [M1013210], [PARAMETRES],[HEURES],[TYPE])

Hello
I have an aggregate measure in a cube ASO, aggregating to a minimum, I tried to use the MIN function but have not worked out as expected in the first Essbase is the sum of the data and then calculates the minimum.
This is the function used:
IIF ( NOT IsLevel ( [Hospital].CurrentMember, 0 ),
MIN( Descendants(CurrentMember ( [Hospital] ),[L.Unknown].Level),[PrzListinoMINInput]),
IIF ( NOT IsLevel ( [Marketing].CurrentMember, 0 ),
MIN( Descendants(CurrentMember ( [Marketing]),[A.Unknown].Level),[PrzListinoMINInput]),
IIF ( NOT IsLevel ( [Listini].CurrentMember, 0 ),
MIN( Descendants(CurrentMember ( [Listini]),[C.Unknown].Level),[PrzListinoMINInput]),
IIF ( NOT IsLevel ( [Bravo].CurrentMember, 0 ),
MIN( Descendants(CurrentMember ( [Bravo]),[D.Unknown].Level),[PrzListinoMINInput]),
IIF ( NOT IsLevel ( [Product Cluster].CurrentMember, 0 ),
MIN( Descendants(CurrentMember ( [Product Cluster]),[E.Unknown].Level),[PrzListinoMINInput]),
IIF ( NOT IsLevel ( [Area].CurrentMember, 0 ),
MIN( Descendants(CurrentMember ( [Area]),[F.Unknown].Level),[PrzListinoMINInput]),
IIF ( NOT IsLevel ( [Area2].CurrentMember, 0 ),
MIN( Descendants(CurrentMember ( [Area2]),[G.Unknown].Level),[PrzListinoMINInput]),
IIF ( NOT IsLevel ( [Area3].CurrentMember, 0 ),
MIN( Descendants(CurrentMember ( [Area3]),[H.Unknown].Level),[PrzListinoMINInput]),
IIF ( NOT IsLevel ( [Area4].CurrentMember, 0 ),
MIN( Descendants(CurrentMember ( [Area4]),[I.Unknown].Level),[PrzListinoMINInput]),
IIF ( NOT IsLevel ( [Customer].CurrentMember, 0 ),
MIN( Descendants(CurrentMember ( [Customer]),[N.Unknown].Level),[PrzListinoMINInput]),
0))))))))))
how to proceed in these cases?
Thank you

Similar Messages

  • Using PeriodToDate MDX function in an ASO cube (Dynamic Time Series)

    Hyperion Essbase 7.1.2
    Since ASO doesn't support Dynamic Time Series (DTS), I am trying to use the "PeriodToDate" MDX function to get MTD and YTD totals. Below is my Time dimension:
    Time (Time - Stored)
    ...I---> 2007
    ......l---> Q1-2007
    .........l---> Jan-2007
    ............l---> 2007-01-01
    ............l---> 2007-01-02
    ............l---> 2007-01-03
    .........l---> Feb-2007
    .........l---> Mar-2007
    ......l---> Q2-2007
    ......l---> Q3-2007
    ......l---> Q4-2007
    Syntax:
    PeriodsToDate ( [layer [, member ]] )
    I tried many different ways to get the right syntax but it didn't work when I set the formula on member "2007" for YTD totals or on months to get MTD. Any help would be appreciated.
    Message was edited by:
    user597443

    ASO does not have Dynamic Time Series at all (unless something just recently changed)
    Period to date functionality has to be managed via MDX formulas and/or alternate roll ups in your time dimension.
    Time Balancing does have to be a stored hierarchy, which is what you generally want anyway. The issue you have with Time balancing is that some times if you have an alternate roll up in your time dimension, it can cause problems with Time balancing.
    If you want to use Time balancing, I would sugest a single stored time heriarchy and use an anakytic view dimension for the period to date functionality.
    You can see a post I have on my blog that talks about this: garycris.blogspot.com
    One other thing to mention. If you wan to use built in time balance functionality, you must tag a dimension as Account Type and it will have to be a dynamic dimension.

  • Using "left" mdx function in script logic

    Hello experts,
    I'm fetching a selection from a package prompt into a logic.
    The dimension name is ENTITYCC, so the variable name is %ENTITYCC_SET%.
    In this prompt user can select members from a hierarchy like that :
    CH20
    --- CH201000
    --- CH202000
    --- CH203000
    FR20
    --- FR201000
    --- FR202000
    --- FR203000
    and so on
    In my logic I need to have the parent node selected, but in case the user select a leave, I need to keep only first four caracters of his selection (to simulate the fact he select the parent)
    left(%ENTITYCC_SET%,4)
    What would be the instruction to get in another variable only the first four caracters of %ENTITYCC_SET% ?
    Thanks for your ideas.
    G.

    Solved by myself, sorry for the useless post.
    (my solution is :
    *SELECT(%ENTITY%,"left([ID],4)","ENTITYCC","[ID] = '%ENTITYCC_SET%'")
    and remember to use lgf file and not lgx when there is mdx in the logic

  • MDX Function Descendants

    Hey,
    I'm trying to use a mdx function on the business model using Evaluate_AGGR.
    Any idea why this is not working?
    EVALUATE_AGGR('Descendants( \[%1], 1, AFTER)', "ES_FIN_BGATE_BIRE"."BGATE".."Pnl"."Gen6,SITES" )
    I've got the following error:
    Syntax error in input MDX query on line 2 at token 'member' (HY000)
    Generate code:
    member \[Accounts].\[MS1] as 'Descendants( \[\[SITES].Generations(6)], 1, AFTER)', SOLVE_ORDER = 101
    select
    { \[Accounts].\[MS1]
    } on columns
    from \[BLUEGATE.Pnl]
    Thanks!

    The "Descendants" function needs a dimension member specification. You can't simply put a dimension level (as OBIEE uses for referencing hierarchy generations of an outline).
    This will work:EVALUATE('Intersect(Descendants([Deltas],1,SELF_AND_BEFORE),%1.dimension.members)', Scenario."Gen3,Scenario")This will work as long as you don't use any other columns (speaking OBIEE terms) from the specified dimension (in this case Scenario).EVALUATE('Intersect(Descendants(%1.dimension.CurrentMember,1,SELF_AND_BEFORE),%1.dimension.members)', Scenario."Gen3,Scenario")So as long as you manage to get a singular dimension member into the function you're ok. Think prompts / presentation variables. Lists of dimension members retrieved through dimension level specifications and filters will not work.
    Cheers,
    C.

  • Problem using MDX functions in Answers Filter

    I'm using OBIEE 10.1.3.2.
    I'm using an Essbase cube as my datasource (aggregate storage).
    My level 0 members in my Date dimension are of the format yyyy-mm-dd (e.g., 2011-08-13)
    I have a dashboard prompt selecting the date from a calendar which returns the date and time (yyyy-mm-dd hh:mm:ss). So naturally I can't do just a straight equals between the prompt value and the member value.
    What I've written in the filter sql in Answers is: Date.Days = Evaluate('SUBSTRING(%1,1,10)','@{varStartDate}')
    The log shows the following:
    -------------------- SQL Request:
    SELECT Date.Days saw_0, main.total_completed_orders saw_1 FROM SIKAgg2 WHERE Date.Days = Evaluate('SUBSTRING(%1,1,10)','2011-08-09 00:00:00') ORDER BY saw_0
    -------------------- Sending query to database named mezen (id: <<9648>>):
    With
    set [Date4] as 'Filter([Date].Generations(4).members, (([Date].CurrentMember.MEMBER_ALIAS = "2011-08-09 00:00:00" OR [Date].CurrentMember.MEMBER_Name = "2011-08-09 00:00:00")))'
    select
    { [Measures].[total_completed_orders]
    } on columns,
    NON EMPTY {SUBSTRING(,1,10)SUBSTRING(,1,10)SUBSTRING(,1,10){[Date4]}} properties ANCESTOR_NAMES, GEN_NUMBER on rows
    from [SIKAgg2.main]
    So with all that being said it doesn't appear that the MDX function SUBSTRING is actually doing anything.
    1) Am I using the function incorrectly?
    2) Is there a better way to do this? I really just need to get rid of the time portion of the variable from the date prompt.
    Any help/guidance would be greatly appreciated. Spending too much time with trial and error approach.
    Thanks,
    Brad

    Brad,
    Try this way..In OBIEE RPD - Physical Layer for level 0 members in my Date dimension. Double click this member and check its type. Change the type to 'DATE' from 'DATETIME'. Delete the Date Dimension in BMM layer & Presentation Layer for again drag and drop from Physical Layer after changing the Type in physical layer.
    Normal way of building the RPD using Essbase
    Something similar to this http://www.rittmanmead.com/2009/03/dates-timestamp-and-oracle-bi-answers-filters/
    This shud solve your timestamp problem everywhere. This is one of the most common problem for Oracle sources. I have essbase as a source but unfortunately I can't replicate it as this is not having time level.
    Let me know if this solves your problem...
    In case the type is DATE only in RPD then I'll try to provide a diff soln here.
    Hope this helps

  • Remove leading zeros using MDX function

    Hello,
    BO XI R3.1 SP2 FP2.5, SAP BW 7.0
    This seems simple, but I cannot find a solution.
    How do I remove leading zeros from a character field in a OLAP universe. Is there any MDX function?
    I tried
    <EXPRESSION>
    Value([0MATERIAL].[LEVEL01].[[20MATERIAL]].[Value])
    </EXPRESSION>
    <EXPRESSION>
    StrToValue([0MATERIAL].[LEVEL01].[[20MATERIAL]].[Value])
    </EXPRESSION>
    I can remove the leading zeros in Webi, but we require it for ad-hoc reporting? Is there a way to do this in the universe?
    Thanks,
    Nikhil

    Hi,
    SAP BW MDX only allows calcuated expressions that return numeric values: this is one if the main SAP MDX limitations.
    By the way there is the abilitiy to return string only for those expressions:
    [Dimension].currentmember.name
    [Dimension].currentmember.uniquename
    So you can do this:
    <EXPRESSION>
    (right([0MATERIAL].currentmember.name, 4))
    </EXPRESSION>
    <EXPRESSION>
    (right([0MATERIAL].currentmember.uniquename, 4))
    </EXPRESSION>
    <EXPRESSION>
    (left([0MATERIAL].currentmember.name, 3))
    </EXPRESSION>
    <EXPRESSION>
    (left([0MATERIAL].currentmember.uniquename, 3))
    </EXPRESSION>
    Otherwise you can use WebI formulas as described in the thread.
    Regards
    Didier

  • Rank function use in MDX

    Hi Expert,
    Could you please let me know how can I use rank function in MDX to achieve the result in below format. Highest value should be ranked as 1
    Actual/Expected Dataset appears as:
    Thanks Chandan

    Hi C,
    You can use the mdx RANK() function. For example, this query has ranking of cities by sales amount. You could create two sets, and two calcs with RANK() functions for your challenge.
    WITH
    SET OrderedCities AS Order
    ([Geography].[City].[City].members
    , [Measures].[Reseller Sales Amount], BDESC
    MEMBER [Measures].[City Rank] AS Rank
    ([Geography].[City].CurrentMember, OrderedCities)
    SELECT {[Measures].[City Rank],[Measures].[Reseller Sales Amount],[Measures].[City Rank]} ON 0
    ,[Geography].[City].[City].MEMBERS
    ON 1
    FROM [Adventure Works]
    Hope that helps,
    Richard

  • MDX - function expects a string or numeric expression for the 1 argument. A tuple set expression was used.

    why this query
    select [Measures].[F Events Count] on 0,
    Filter([D Actor Player].[Actor].children,
    ([Measures].[F Events Count],
    {([D Date].[Hierarchy].[Season].[2012 - 2013]),([D Date].[Hierarchy].[Season].[2013 - 2014])},
    [D Result].[Result].&[Goal])
    >=5) on 1
    from [FBA Cube]
    gives this error:
    Query (3, 3) The >= function expects a string or numeric expression for the 1 argument. A tuple set expression was used.
    while the following query works fine
    select [Measures].[F Events Count] on 0,
    Filter([D Actor Player].[Actor].children,
    ([Measures].[F Events Count],
    [D Date].[Hierarchy].[Season].[2012 - 2013],
    [D Result].[Result].&[Goal])
    >=5) on 1
    from [FBA Cube]
    why having set inside Filter's boolean expression generates that error? how can we
    keep the set inside the Filter's boolean expression but
    solve the problem? please explain the reason and solution

    Hi Butmah ,
    I think you should use an aggregation function with the set and the tuple ... adding an AdventureWorks snippet :
    select [Measures].[Order Count] on 0,
    Filter([Product].[Category].children,
    SUM({[Date].[Fiscal].[Fiscal Year].&[2011],[Date].[Fiscal].[Fiscal Year].&[2009]}
    ,([Measures].[Order Count],[Geography].[Geography].[Country].&[United States])
    >=5) on 1 
    from [Adventure Works]
    Regards, David .

  • How to format an account to show date format with MDX function @FORMATDATE

    Hello,
    I am working with an ASO cube where all accounts are set as numeric type. We have some accounts which hold date information for eg Date1 member which is a stored member will have data as 20120601 for June 1st 2012. In financial reports, i need to show this data as 06/01/2012 and using as essbase connection in FR, i cannot do this.
    While i was looking for a solution, i came across the MDX function called
    @FORMATDATE
    format_string_expression = MdxFormat ( string_value_expression )
    I was hoping that if i add a member say Date2 and make it dynamic and point it to Date1 and have this MDX format command to make the numeric data 20120601 show up as 06/01/2012.
    Can this work and if yes, what would be the MDX formula in this case?
    Any help in this regard will be a great help...the other alternative i have is to export this date data out into an oracle table, transform that data into to_date and after enabling the type measures in the outline, load it back in...i was hoping to avoid this extra route if this can be done with the formatting via MDX withing the essbase app.
    Thanks...

    For all good order, here is the log from the Disk Utility:
    2012-12-07 21:18:03 +0100: Disk Utility started.
    2012-12-07 21:21:46 +0100: Preparing to partition disk: “WDC WD30 EZRX-00DC0B0 Media”
    2012-12-07 21:21:46 +0100:     Partition Scheme: GUID Partition Table
    2012-12-07 21:21:46 +0100:     1 partition will be created
    2012-12-07 21:21:46 +0100:
    2012-12-07 21:21:46 +0100:     Partition 1
    2012-12-07 21:21:46 +0100:         Name        : “Gardermoen”
    2012-12-07 21:21:46 +0100:         Size        : 3 TB
    2012-12-07 21:21:46 +0100:         File system    : Mac OS Extended (Journaled)
    2012-12-07 21:21:46 +0100:
    2012-12-07 21:21:46 +0100: Unmounting disk
    2012-12-07 21:27:59 +0100: Partition failed for disk WDC WD30 EZRX-00DC0B0 Media Wiping volume data to prevent future accidental probing failed.
    B*gger.  :-(

  • Not able to use multiple grid function in smartview

    Hi,
    One of my client want to use multiple grid function in Hyperion smartview and he was using latest version of Hyperion smartview 11.1.2.5. But still that feature was not enabled in smart view.
    Our's is windows environment and essbase server version 11.1.2.1 and APS version 11.1.2.1.
    Can anyone please help me to resolve this issue.
    Please let me know if i might missed anything or still if any info required.
    Thanks in Advance.
    Thanks,
    Kumar.

    Thanks for your help Celvin. I will try to apply the path for both APS and essbase server and will check.
    Thanks once again.
    Regards,
    Vinay Kumar.

  • How to use Topcount in an OLAP universe

    Hi,
    I want to create an object who gives me the best 10 Values back.
    I try to use topcount with the following code:
    <EXPRESSION>
    TOPCOUNT([Measures].[OINV INVOICE NET VALUE], 10,)
    </EXPRESSION>
    But i get no data back.
    The help in the universe designer says the following:
    TOPCOUNT("Set", "Count"[, "Numeric Expression"] )
    returns a specified number of items from the topmost members of a set
    Which function has the "Numeric Expression", and what are possible expressions?
    Thanks for helping.
    Kind Regards
    Jens

    Hi Jens,
    take a look at this document, which has several examples:
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/c0a45246-ce76-2b10-e688-f5c8206203eb
    Ingo

  • Problem with MIN MDX Function on ASO

    Hello
    I have an aggregate measure in a cube ASO, aggregating to a minimum, I tried to use the MIN function but have not worked out as expected in the first Essbase is the sum of the data and then calculates the minimum.
    This is the function used:
    IIF ( NOT IsLevel ( Hospital.CurrentMember, 0 ),
    MIN( Descendants(CurrentMember ( Hospital ),http://L.Unknown.Level),PrzListinoMINInput),
    IIF ( NOT IsLevel ( Marketing.CurrentMember, 0 ),
    MIN( Descendants(CurrentMember ( Marketing),http://A.Unknown.Level),PrzListinoMINInput),
    IIF ( NOT IsLevel ( Listini.CurrentMember, 0 ),
    MIN( Descendants(CurrentMember ( Listini),http://C.Unknown.Level),PrzListinoMINInput),
    IIF ( NOT IsLevel ( Bravo.CurrentMember, 0 ),
    MIN( Descendants(CurrentMember ( Bravo),http://D.Unknown.Level),PrzListinoMINInput),
    IIF ( NOT IsLevel ( Product Cluster.CurrentMember, 0 ),
    MIN( Descendants(CurrentMember ( Product Cluster),http://E.Unknown.Level),PrzListinoMINInput),
    IIF ( NOT IsLevel ( Area.CurrentMember, 0 ),
    MIN( Descendants(CurrentMember ( Area),http://F.Unknown.Level),PrzListinoMINInput),
    IIF ( NOT IsLevel ( Area2.CurrentMember, 0 ),
    MIN( Descendants(CurrentMember ( Area2),http://G.Unknown.Level),PrzListinoMINInput),
    IIF ( NOT IsLevel ( Area3.CurrentMember, 0 ),
    MIN( Descendants(CurrentMember ( Area3),http://H.Unknown.Level),PrzListinoMINInput),
    IIF ( NOT IsLevel ( Area4.CurrentMember, 0 ),
    MIN( Descendants(CurrentMember ( Area4),http://I.Unknown.Level),PrzListinoMINInput),
    IIF ( NOT IsLevel ( Customer.CurrentMember, 0 ),
    MIN( Descendants(CurrentMember ( Customer),http://N.Unknown.Level),PrzListinoMINInput),
    0))))))))))
    how to proceed in these cases?
    Thank you

    Standard troubleshooting steps in the following order:
    1. Reset: Press the sleep/wake button & home button at the same time, keep pressing until you see the apple logo, then release. Ignore the slide to power off. You won't lose any data or settings.
    If no change, continue:
    2. Restore your phone from your most recent backup & re-sync your itunes content, Note however: if the problem is related to corrupt data in your phone's backup, while this will restore a fresh OS, it will also restore the problem.
    If no change, continue:
    3. Restore as a "new" phone in itunes & re-sync your content. All saved data will be lost.
    If no change, make an appointment at an Apple store, as you most likely have a hardware problem. There are no further user troubleshooting steps available.

  • BO XI 3.1 Sp2 OLAP Universe - MDX Function

    Hi all,
    How i tuse MDX Functions in OLAP Universe ?
    Iam getting parse ok in Universe . getting error in while creating webi report

    Hi... i´ve seen that this is a typical question but i think it´s still not solved... I need to use the sentence showed but despite using measures using another dimension. I mean i want to create a new dimension which tell me if it has values or not so i want to create another one and use the function IIF and the sentence more or less like that:
    IIF(ISEMPTY(.[D7LE0EX5IUP5U83WHERK13M48]), 1, 0)</EXPRESSION> - it works
    May i use this sentence with dimension/characteristic values or it only works for measures ? Some idea of how to achieve what i´m looking for ?
    Thanks in advance.
    SAP BW 7.02 SP06
    BO XI 3.1 FP 3.5
    J.Casas

  • MDX Function

    <p>I am just curious, is there a function in MDX similar to the@MATCH function in BSO? For instance, IF (@ISMBR (@MATCH("Time Periods", "FEB_*")))#Missing; ENDIF. Thanks!</p>

    Hi Butmah ,
    I think you should use an aggregation function with the set and the tuple ... adding an AdventureWorks snippet :
    select [Measures].[Order Count] on 0,
    Filter([Product].[Category].children,
    SUM({[Date].[Fiscal].[Fiscal Year].&[2011],[Date].[Fiscal].[Fiscal Year].&[2009]}
    ,([Measures].[Order Count],[Geography].[Geography].[Country].&[United States])
    >=5) on 1 
    from [Adventure Works]
    Regards, David .

  • Using iPad mail program I have a draft of an email. I attempted to "cancel" and "delete draft" but it is still on my screen even after shutting down and restarting. How do I exit so that I can use other mail functions?

    Using iPad mail program I have a draft of an email. I have attempted to "cancel" this and "delete draft" but the email stays on my screen. How can I exit this so that I can use other email functions?

    Try closing the Mail app completely and see if it works properly when you re-open the app : from the home screen (i.e. not with the Mail app 'open' on-screen) double-click the home button to bring up the taskbar, then press and hold any of the apps on the taskbar for a couple of seconds or so until they start shaking, then press the '-' in the top left of the Mail app to close it, and touch any part of the screen above the taskbar so as to stop the shaking and close the taskbar.
    If that doesn't work also do a reset : press and hold both the sleep and home buttons for about 10 to 15 seconds (ignore the red slider), after which the Apple logo should appear - you won't lose any content, it's the iPad equivalent of a reboot.

Maybe you are looking for

  • What if I have to reinstall iTunes because I get an err msg?

    I got an error message yesterday in iTunes that said I needed to reinstall iTunes. It said there was something missing that I needed to import and burn CD's. I have had the program up and running since December of last year. I also have about 5400 so

  • Library question: itunes is replacing rather than adding a folder

    Hi, I had music on my new computer before I imported all my old music and library files from my old computer. I kept the file names the same so that my 'old' library would be able to find my 'old' music on my new computer. That worked pretty well (I'

  • HT1338 I can not connect to the mac app store. How can I connect? I'm connected to the internet.

    Every since I've upgraded from snow leopard to mountain lion. I've have had problems. Let me list all that I've done: 1.I've reinstalled the mountain lion operating system. 2' Replaced my hard drive. 3. Clean installed and migrated my files 4. Now I

  • Help with photos/videos

    Im trying to add photos to my Itunes library but every time I go to the file and add it...it just doesnt go into my library....also when I play videos the audio doesnt work. I need some help please!

  • Issue with the recent MAC OSX 10.7.5 update

    The recent MAC OSX 10.7.5 update rendered my WD external backup disk unusable. The iMAC only recognizes it as read-only now despite having 2 TB of available space. It doesn't even show on my desktop anymore.  I have tried disk repair but it couldn't