Questions tagged [mdx]

Multidimensional Expressions (MDX) is a query language for OLAP databases. It was developed by Microsoft but has later gained widespread support from other OLAP vendors.

What is MDX?

"Multidimensional Expressions (MDX) is a query language for OLAP databases, much like SQL is a query language for relational databases. It is also a calculation language, with syntax similar to spreadsheet formulas." Source: Wikipedia

It was originally developed as a language for Microsoft's OLAP engine (then called OLAP Services, now renamed Analysis Services) but has since been adopted by a wide range of vendors for use with their OLAP tools.

Resources

Books

3942 questions
1
vote
1 answer

MDX IN Or SubQuery

I am making a sales cube for a bank, I need to do a query with this Dimensions DimTiempo, DimCliente, DimCuenta I need to find the number of customers who are in DimCuenta attribute [DimCuenta].[Planes].[Cue Nombre Plan] with value 'APORTES…
MelgoV
  • 661
  • 8
  • 21
1
vote
1 answer

MDX: Count number of days excluding weekends

I already had an MDX query that returns number of days in a Month Hierarchy using a calculated member. What I needed to do is to add new calculated member that returns number of days excluding weekends (Saturdays and Sundays). Below is my existing…
ggarcia
  • 47
  • 1
  • 10
1
vote
1 answer

MDX Query WHERE Dimension = another Dimension

If I have two Dimensions: Origin and Destination how can I count the number of times Origin = Destination? SELECT [Location] ON COLUMNS FROM [DELIVERIES] WHERE ( [Origin] = [Destination] ) [Origin] = [Destination] obviously isnt the answer... The…
Gemione
  • 65
  • 7
1
vote
0 answers

Why won't my SSAS Cube URL Action appear in Excel?

I am working with a SSAS 2008 R2 OLAP cube and Excel 2010. I have set up a URL Action in the cube with a target type of Cells and a Target object of All Cells. When I have a hard coded URL in the Action Expression - for example…
Greg the Incredulous
  • 1,676
  • 4
  • 29
  • 42
1
vote
1 answer

How to get top 2 count record and rest total(others) using two dimension in same mdx

i have this query, i need to implement for two dimension WITH SET [TCat] AS TopCount([Product].[Subcategory].[Subcategory],10,[Measures].[Sales Amount]) MEMBER [Product].[Subcategory].[Other] AS Aggregate([Product].[Subcategory].[Subcategory] -…
user3843858
  • 321
  • 1
  • 5
  • 21
1
vote
4 answers

How to clear cache in Pentaho

I am using Pentaho 5. My dimensions keep changing frequently and I need the changes to be applied to the dashboard, this is not possible because Pentaho keeps caching. I have created the cube using the datasource wizard and the querys using mdx over…
Sindu_
  • 1,347
  • 8
  • 27
  • 67
1
vote
1 answer

MDX YTD returning null

I'm new to MDX and i was trying to use the YTD function on my cube but I'm getting a problem with it. If I specify the date in the code it works fine: WITH MEMBER [Time].[Year - Quarter - Month - Date].[YTD_SALES] AS Aggregate( …
vale
  • 65
  • 1
  • 8
1
vote
0 answers

Dimension is not filling aggregates

I am having trouble with setting dimension My DB: PERSON: id PRIMARY KEY name SALES: id person_id FOREIGN KEY -> person.id value Now i want to make a CUBE SALES with DIMENSION PERSON and MEASURE VALUE CUBE -table: SALES -dimension: PERSON…
Zolik
  • 11
  • 2
1
vote
1 answer

MDX Filter a dimension with another dimension

To all excuse my ignorance, but I'm new to MDX below is the query I'm trying to run SELECT NON EMPTY { [Measures].[Task Burn Down] } ON COLUMNS, NON EMPTY { ([Calendar].[Date].[Date].ALLMEMBERS * [Priority].[Priority Code].[Priority…
John Hartsock
  • 85,422
  • 23
  • 131
  • 146
1
vote
1 answer

MDX query producing #Error as output

In my SSAS Cube, I have a measure called [Sales Total]. What I want to do is to create another measure that would give me the lowest sales figure in the last 6 months. I want this to be a moving minimum, calculated as the min of sales of every time…
Thracian
  • 651
  • 4
  • 8
  • 24
1
vote
1 answer

SSAS - MDX - Read multiple attributes from a dimension

For example, taking into account the Adventure Works database, I would like to display on rows the hierarchy of accounts and on columns i would like to show "Account Type" property. This MDX shows an "#Error" on the Account Type column: WITH MEMBER…
user3104183
  • 408
  • 1
  • 9
  • 26
1
vote
1 answer

Custom Column header in MDX

I am trying to fill MDX query result to a datatable. Query is generating dynamically. When i fill datatable column header like [Dim Date].[Day].[Day]. I need it Log Date. Is there any way to change column header ? I mean, in TSQL we using select…
Arun Raj
  • 969
  • 8
  • 19
1
vote
1 answer

MDX how to count visited users in yesterday exist visit today

I have a fact table to store user login date_key | user_key 20140701 | 1 20140701 | 2 20140701 | 3 20140701 | 4 20140702 | 1 20140702 | 2 20140702 | 3 20140702 | 8 20140703 | 1 20140703 | …
Coca'sPP
  • 13
  • 2
1
vote
0 answers

call method in unit test with mdx query. error on identity

I have an apicontroller and I want test a method in a test project. But if i call the method from unit project,i got an error. The method that i want test, contain a code to execute a query in mdx Dim dataAdapter As…
user3401335
  • 2,335
  • 2
  • 19
  • 32
1
vote
2 answers

How to create MDX parameters for SQL Server Reporting Services (SSRS)?

In SQL Server Reporting Service, when I connect to my cube to create a dataset, in Query Designer I create my query with a filter. It creates the following MDX for me: SELECT NON EMPTY { KPIValue("KPI1"), KPIGoal("KPI1"), KPIStatus("KPI1") } ON…
Bob
  • 22,810
  • 38
  • 143
  • 225
1 2 3
99
100