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
5
votes
2 answers

MDX Query to find the last ever non empty value in icCube

Following the post from Chris Web I am looking for a fast way to find the last buy from a customer. I use an MDX statement like the following: WITH FUNCTION previous_buys() AS tail( nonempty({NULL:[Time].[Time].currentmember.prevmember}…
Arthur
  • 1,692
  • 10
  • 14
5
votes
4 answers

SSAS 2008 Basics : Tutorial

I'm looking for pointers to a tutorials for SSAS 2008 which also covers learning MDX queries ?
Sreejesh Kumar
  • 2,449
  • 12
  • 51
  • 72
5
votes
2 answers

What does MDX Aggregate() do with a single argument?

I understand how to use the MDX Aggregate() and Sum() functions, and the differences between them. (One interesting one is that the Sum of a measure defined at a higher level in a hierarchy over that level's Children multiplies the measure by the…
SebTHU
  • 1,385
  • 2
  • 11
  • 22
5
votes
2 answers

MDX Filter expression understanding

Am having trouble in understanding how FILTER function works in MDX. Here is my query which gets all the non-empty Internet Order Count values for all Sales Territory Countries across all the Calendar Years. SELECT NON EMPTY { …
VKarthik
  • 1,379
  • 2
  • 15
  • 30
5
votes
2 answers

Rounding of calculated measure in MDX

How can i round a calculated mdx measure up to the nearest integer without having Excel on the server? The Excel-function is CEILING(number, significance), but it is not possible to install Excel on the production ssas-server.
Espo
  • 41,399
  • 21
  • 132
  • 159
5
votes
1 answer

How to add condition (measure is greater than 0) in an MDX query

I have the following query in MDX With member [Week Count] as ( ([WORK ].[Complying Flag].&[COMPLYING], [Measures].[No of Work ]) /([WORK ].[Complying Flag].[(All)].[All], [Measures].[No of Work ])) *100 select {[Week Count]} on…
canada canada
  • 181
  • 4
  • 12
5
votes
3 answers

How do I define a Calculated Measure in MDX based on a Dimension Attribute?

I would like to create a calculated measure that sums up only a specific subset of records in my fact table based on a dimension attribute. Given: Dimension Date LedgerLineItem {Charge, Payment, Write-Off, Copay, Credit} Measures …
Shane Delmore
  • 1,575
  • 2
  • 13
  • 19
5
votes
1 answer

MDX - large crossjoin with nonempty - how to optimize performance

I have built a model in icCube on top of a General Ledger codeblock, which has the following dimensions (not limitative): Time Entity Cost center Account Intercompany party Project Activity Amount (this is the value) With this model loaded in a…
Arthur
  • 1,692
  • 10
  • 14
5
votes
1 answer

SSAS sum measure based on daily currency exchange rates

This measure, successfully converts my measure to the currency selected. So if I get data, from the 1st of the month, till the 15th of the month, what will happen is that the exchange rate taken for the currency selected would be of the 15th of the…
Mez
  • 4,666
  • 4
  • 29
  • 57
5
votes
2 answers

DAX equivalent for MDX Calculated Member

We have a SSAS 2012 tabular model at our disposal which we are reporting on with Tableau. Currently, we have a dimension [Material] with an attribute [Department]. What we're trying to do is create an MDX calculated member equivalent in DAX for…
5
votes
1 answer

Filtering MDX query with current year & month using Now()

How can I filter data in MDX with current Year & Month? What I did so far is: WHERE strtomember{ [Time Dim].[FSCL YEAR].&["+Format(now(), "yyyy")+"], [Time Dim].[FSCL MONTH].&["+Format(now(), "m")+"] } but it is not working.
Aditya
  • 2,299
  • 5
  • 32
  • 54
5
votes
1 answer

SSAS MDX WHERE clause syntax - filtering multiple values from the same hierarchy

I'm quite new to data warehousing and MDX queries, and I realize that I'm probably not using the MDX syntax properly in the case below. I'm using SSAS 2005 on MS SQL Server 2005 and would like to query my cube and filter the results with multiple…
Yuval Herziger
  • 1,145
  • 2
  • 16
  • 28
5
votes
1 answer

Sum Specific Columns for Select Statement

I'm very new to SSAS and MDX and trying to get the concept of it. I need help please. I have a booking fact table and I want to get the number of passengers by market for specific booking year and departure year and for each departure year I want a…
Maor
  • 73
  • 4
5
votes
3 answers

Filtering a Measure (or Removing Outliers)

Say I have a measure, foo, in a cube, and I have a reporting requirement that users want to see the following measures in a report: total foo total foo excluding instances where foo > 10 total foo excluding instances where foo > 30 What is the best…
Colin
  • 309
  • 2
  • 5
  • 15
5
votes
5 answers

Distinct count to exclude NULL

Is there a way to create a calculated measure that can do a distinct count, but excluding the null values? For example, if I have: 10, 20, 20, null; the distinct count is 3, but can I have the answer as 2?
Irawan Soetomo
  • 1,315
  • 14
  • 35