Questions tagged [mdx-query]

A sample MDX query looks like below.

[ WITH <SELECT WITH clause> [ , <SELECT WITH clause> ... ] ]   
SELECT [ * | ( <SELECT query axis clause>   
    [ , <SELECT query axis clause> ... ] ) ]  
FROM <SELECT subcube clause>   
[ <SELECT slicer axis clause> ]  
[ <SELECT cell property list clause> ]  
140 questions
2
votes
1 answer

MDX - How to present members of hierarchy as multiple columns

I am new to MDX on Analysis Services. So I have a bit of a problem. How do I get max value of child values in a parent? For example, I am using AdventureWorksDW on SSAS. The model has a hierarchy in Product > Prodct Category > Product…
Toàn Đoàn
  • 161
  • 8
2
votes
1 answer

ORDER ALLMEMBERS BY ASC [MDX]

Using my query I can get by Month in a specific year my sales but I have disorder. Columns are ordered by: 1,10,11,12,2,3,4,5,6... it should be: 1,2,3,4,5,5,6,...10,11,12 How can I change that? Here's my code SELECT [Dim…
Antonio Labra
  • 1,694
  • 2
  • 12
  • 21
2
votes
3 answers

OLAP Cube Calculation for Last Year Comparison on Week Day - MDX

I want to compare actual sales values with sales values of last year. The difficulty in this comparison is the compliance of the week days and thereby of the leap-year. Example on day level: 2016-02-04 (thursday): actual sales: 580,- last year…
Alexo
  • 131
  • 4
  • 15
2
votes
0 answers

SSAS MDX: Time Calculation with a date range

In my cube, I have a Scope statement for the Previous Year Same Period [PY SAME Period]. ([Time Calculations].[PY Same Period]= Aggregate( CrossJoin ( {[Time Calculations].[Current Period]}, PARALLELPERIOD( …
xanhdieu
  • 43
  • 3
2
votes
0 answers

Connection String not valid - MDX query error in Power Pivot

I am trying to execute MDX query in Power Pivot. While creating connection I have selected Model.odc. The connection string gets validated successfully by Test Connection. In further step when I execute the MDX query and click on Validate query. The…
Amruta
  • 701
  • 4
  • 15
  • 38
2
votes
1 answer

SSAS MDX - aggregate with multiple members

I have the MDX query below and the result is not what I expected. If my where clause is included just 1 city ([Geography].[Iorg].[City].[San Francisco]) then my aggregate result is correct for that city, but if Included 2 cities then my aggregate…
xanhdieu
  • 43
  • 3
2
votes
1 answer

MDX : get members from a subselect (FILTER BY in MDX+)

I've got the following MDX statement: WITH MEMBER [Measures].[ist] AS __get_time_member__ SELECT // Measures {[Measures].[ist],[Measures].[soll]} ON 0, // Rows FROM [Finance] FROM ( SELECT [Time].[Time].[month].&[2018-04-01] on 0 from…
Arthur
  • 1,692
  • 10
  • 14
1
vote
1 answer

I need to calculate 2nd year retention for Employees

We have an EmployeeEvents cube (multidimensional). I need to get a set of employees that started anytime in the last 24 months (I have a new hire flag). The count of this set is the denominator. Then get a subset of those employees that are still…
Kevin
  • 13
  • 4
1
vote
1 answer

MDX parameters in SSRS with large data set

I have a lot of data in a cube and I have a query that works perfectly. I need to make this smaller and the user needs to add the Number and Year and the data displayed because there is just too much information. I have added a parameter on the…
TheresaB7
  • 11
  • 1
1
vote
1 answer

Unknown error of multidimensional expressions (MDX) calculation in SSAS Cube

I just got a project handover regarding SSAS cubes and multidimensional expressions. There is a calculation written in Visual Studio: (StrToMember( "[DIM Time_V3].[Year - Week - Date].[Month].&["+ MID(MemberToStr([DIM Time_V3].[Year - Month -…
hongyi jin
  • 11
  • 2
1
vote
1 answer

How to add one more measure in MDX where clause?

Below query is perfectly working and bringing rolling 12 months data for selected measure. Now how do I add one more measure to same MDX query so that query fetch rolling 12 months for 2 measures? Thanks in advance for your help. Working query with…
kpsr
  • 11
  • 2
1
vote
1 answer

MDX Comparing Dates (Before and After)

Hoping for any help with hopefully a simple problem - I'm writing MDX into a rule builder within a company application. Here is the expression: IIF(Time.CurrentMember >= [Time].&[456], "Formula 1" , "Formula 2") The expression should compare each…
fashpixie
  • 11
  • 1
1
vote
2 answers

Sort measures where row and column axis are cross-joined in MDX

I've a table where there's two dimensions in the row axis crossjoined and two dimensions plus a measure crossjoined in the column axis. Eg: I would like to sort the rows of a specific column, taking the image as an example I would like to sort all…
1
vote
0 answers

How to use date range in IIF function in MDX Query

Am having 2001,2002 and 2003 years of data in the SSAS server. Without using where clause and filters I need to get the aggregated data using the IIF function in the MDX query for a particular date range. I have referred to many sites but I didn't…
TAMILARASAN R
  • 225
  • 1
  • 6
1
vote
0 answers

Unable to get period over period data from SSAS server using mdx query

Am using the MDX query in the SSAS server. I want to get the current year(01/01/2002 - 31/12/2002) and previous year(01/01/2001 - 31/12/2001) data for a specific date range(dynamically change) in a single MDX query based on the used measure and…
TAMILARASAN R
  • 225
  • 1
  • 6
1
2
3
9 10