mdx

Calculating MODE (most common number in a set) in Sql Server Analysis Services.

Is there a way to calculate the MODE in SSAS? I see there are Microsoft provided functions for Median, AVG, Max, and Min but nothing for Mode. Would I need to code a user defined function in .net to make this happen or is there an easier alternative? ...

MDX Error: Query Optimizer generated too many subcubes in the query plan

Hi, I'm trying to ask to a cube on SQL Server 2008 with a huge mdx query. This query contains more than 20 calculated members (defined on the query). Each member contains a restriction for a dimension on the cube. Not always need all dimensions, but sometimes it is needed. Well, it works fine until 16 members. With more than 16 membe...

MDX Calculated Member CrossJoin question

I have an MDX query with the following calculated member: with member [Measures].[BBOX] as Count(    Filter(      CrossJoin([Dim Response].[Response ID].Children, [Dim Question].[Question Text].Children),      [Measures].[Question Bottom Box] > 0) ) The idea is that I want a count of the combinations of two members o...

The correct place to put a markdown extension file in a django project ?

I've created a markdown extension file (called mdx_xxx.py) for a django project I'm working on but I can't really decide where to put it. The documentation says that the file should reside on the PYTHONPATH and I've seen several blog posts inviting to just put the file in the root directory of the project. However, that seems like an o...

How to get "raw" facts data from Analysis Services

We are developed a custom MOLAP engine for live processing a large amount of data in process. And now we got a requirement to integrate SSAS with our system. Dimension's meta info and attributes data are very easy to get. But how can I get facts data without making SSAS to calculate aggregates i.e. data that stored only on leafs? Aggre...

Howto: Display a parameter on a SQL Server Report?

I'm creating some reports in Visual Studio BIDS, out of our SQL Analysis Server 2008. The report works fine, and uses an MDX query with parameters. So far, so good. The problem is that I would like to display the parameter on the report. For example, I would like to display the 'Month' of the Date parameter, but it shows up on the repor...

Changing an array to list in TFS Reports

Creating a report in Team Foundation Server(TFS) and my parameter is set as an array and I want to be able to display this array. I want to be able to switch the array to a list and then be able to show what is selected out of the list by the parameter the user selects. Can someone help please?? :) ...

SQL 2008 - MDX Leaf Level Calculation with Parent Aggregates

What is the optimal way to create a calculated measure to compute a custom variance formula (I cannot use the default Variance function because it does not accommodate custom weights). So the leaf level formula will have 2 components one component will be a fact at the leaf level and the other component will be a parent aggregate at vari...

Recurring calculations in SQL 2008 MDX query

I have an MDX query which returns the following tuples: Dim1A, Dim11, Dim21, Measure1A, Measure11, Measure21 Dim1A, Dim12, Dim22, Measure1A, Measure12, Measure22 Dim1A, Dim13, Dim23, Measure1A, Measure13, Measure23 Dim1A, Dim14, Dim24, Measure1A, Measure14, Measure24 .... .... Dim2A, Dim11, Dim21, Measure2A, Measure11, Measure21 Dim2A, ...

Designing dimension hierarchies: Natural or Unnatural

I'm using Analysis Services and when designing dimensions I'm never sure how far to go to build natural hierarchies. What I mean is I've added in all the genuine attribute relationships. So most hierarchies are natural anyway but the most commonly requested hierarchy is 3 or more levels with a middle level as a slowly changing attribut...

Limiting selectable filter values in reporting services

Hi, I have a SSRS challenge. Hope someone out there can help me out. I have an analysis services data set where is use a date filter as a parameters. When I deploy my report all the dates from my date dimension are displayed as selectable values in the filter drop down. It would be nice if the users could only select the filter values w...

Get share of dimension member in calculated measure

Not sure if what I'm trying to do is possible or if I need to change my data model. I have a dimension containing the different amouts a customer can loan so what I wan't to do is see the share of a certain amount compared to total sales. Pseudo code: member [Measures].[Share 5000] as 'count([Amount].[5000])/([Measures].[Total S...

Execute mdx error

For the following mdx statement - select {[xx].[xx]} on 0, Non Empty({[Date].[Calendar-Y-Q-M-D].[Day].&[7]&[2]&[2010]:[Date].[Calendar-Y-Q-M-D].[Day].&[9]&[2]&[2010]}* {[xx].[xx].&[**/DOWNLOAD/D/0/D/D0D2D81B-0D7C-400C-BEAD-6CC67B48EB72/WINDOWSAZURESDK-X86.MSI**]}* {[yy].[yy].[yy]}) on 1 from [xx Cube] If I use #1 connection ...

MDX format_string for % doesn't multiply by 100 when % sign is at the front

For the following query: with member testVal as 0.1234 member testNormal as testVal member testPrepend as testVal, format_string="%##.00" member testMidpend as testVal, format_string="##%.00" member testAppend as testVal, format_string="##.00%" select { testNormal, testPrepend, testMidpend, testAppend} on axis (0) from [SomeRandomPlace...

MDX TOP 1 - Return TOP 1 from a CUBE

Is there a way I limit the values returned by an MDX query in a way similar to a SQL TOP 1 query. SELECT TOP 1 Names From tbl_Names Order by names DESC e.g. is the a MDX statement that could do the same? ...

TFS2010 sprint rdl report

I'm evaluating tfs2010 and i'm actually in stuck with mdx rdl reporting. Where i could find some example about iteration query? (Sprint team capacity for example... ) ...

SSRS shared data source to SSAS and MDX query

I am trying to deploy reports that connect to an SSAS cube as a shared data source. The problem I'm having centers around that fact that even if I change the Initial Catalog in the SSAS connection string, all the MDX queries in the rdl files still reference the old SSAS cube by name. This is a particular problem because these cube names...

How to override SSAS Business Intelligence 'Currency Conversion' for Liability calculation

I'm setting up a new cube in Analysis Services, and used the Business Intelligence wizard to work out the currency conversion issues. Now this all works perfectly, money is converted at the leaf level and summed up for display in the user's choice of reporting currency. My problem now is the calculation of liability. For liability, I ne...

Mondrian MDX Query, Avoid Fatal Error when Member not Found in cube

Hi folks, i want to know if is it possible to avoid mondrian´s fatal error when it doesn't have any member in defined cube. for instance i have this MDX Query select {[Measures].[Unit_Sales], [Measures].[Quantity], [Measures].[Total]} ON COLUMNS, Hierarchize({([Country.CountryHeirarchy].[All Countries].[USA], [Products.ProductHeirarchy...

Getting leaf nodes in an MDX query.

I'm trying to create an MDX query on the TFS cube which gets the historical values of the Estimate field. For each task I want to get the last estimate for each person who set the Estimate field. For example if Bob the project manager sets the estimate to 24 hours and then Dave the developer sets it to 32 hours, I want to create a quer...