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
0
votes
1 answer

SSAS MDX Previous Year - Country aggregation problem

my previous question for SSAS MDX Previous Year - Ignore Filter was solved. Now i have an other problem. I get now the right previous year result for the store but the aggregation on country level is wrong. My problem was i doesn't get the…
Alexo
  • 131
  • 4
  • 15
0
votes
1 answer

Counting the number of facts in a cell in MDX

Here is a simple schema with two dimensions and a fact with a measure. CREATE TABLE DimThingType ( ThingTypeID int NOT NULL PRIMARY KEY, ThingTypeDescription varchar(8) NOT NULL ) CREATE TABLE DimThing ( ThingID int …
Richard Barraclough
  • 2,625
  • 3
  • 36
  • 54
0
votes
1 answer

Differences between cube measures and mdx measures

is there a difference between a native cube measure (for example Measure1) and this mdx measure : Measure2=[Measures].[Measure1] ? Because when I use these measures together I dont get any results, and when I use them one by one I get what I want.
Hamza Lahbabi
  • 29
  • 1
  • 9
0
votes
1 answer

How to use OR in MDX

I want to return Total Sales for 2019 for County = X OR City = Y. How can I do that? This returns error: SELECT {[Measures].[Total Sales]} ON 0, {[Date].[Date].[Year].&[2019]} ON 1 FROM [Cube] WHERE…
Eric Klaus
  • 923
  • 1
  • 9
  • 24
0
votes
2 answers

MDX - Display the labels/values for dimensions for this MDX query

Usually I display a value for dimensions by using the CurrentMember.Value/caption as as an alias. For the following query this breaks with an error along the lines of 'The hierarchy [Measures] appears in more than one axis or in an axis/axes and a…
TilleyTech
  • 441
  • 5
  • 13
0
votes
1 answer

Order by meansure in MDX

I have problem in this query: WITH MEMBER [Measures].[przychod] AS [Measures].[App Price]*[Measures].[Amount] SELECT NON EMPTY { [Measures].[przychod] } ON COLUMNS, NON EMPTY { ([Client].[City].[City].ALLMEMBERS ) } DIMENSION PROPERTIES…
0
votes
1 answer

And-Or in MDX queries

Please consider this MDX query: SELECT {[Measures].[Internet Sales Amount]} ON COLUMNS, [Date].[Calendar Year].MEMBERS ON ROWS FROM [Adventure Works] How Can I add WHERE clause to above query with these three criteria: 1) Where…
Arian
  • 12,793
  • 66
  • 176
  • 300
0
votes
1 answer

SSAS MDX Calculated Member: 3 months moving average not working

I have some MDX code to produce a 3 Months Average. It doesn't work and I can't find the problem. I've researched many sites - I'm trying to emulate the code found for similar scenarios but can't see what I'm doing wrong. Calculated Member in SSAS…
0
votes
1 answer

SimeReplacing WeekOfYear Dynamically

I am using copy activity in ADF in which i have following pseudo query: SELECT { [Measures].[**************], [Measures].[**************], [Measures].[**************] } ON COLUMNS, NON EMPTY { …
user2459702
  • 31
  • 1
  • 4
0
votes
0 answers

Saving MDX query results to Table or csv file

I am not from SSAS background. We are trying to automate a process where we are currently switching multiple filters on excel sheets that are connected to SSAS cubes and do a visual comparison against the data on a Netezza table. Basically, we are…
0
votes
2 answers

Calculated measure to find the datediff using timedimension

I need to find out the number of days in Month based on Time dimension. Time dimension is Month when Jan is selected it has to return 31 as value.
SKenneth
  • 19
  • 11
0
votes
1 answer

MDX Query change column title

These are my first mdx queries. I would like to execute some queries from a C# application and convert the results to a JSON file or a tabular format. So I need the columns titles, you can see in the picture in attachment the columns title is…
KiMaN
  • 319
  • 1
  • 14
0
votes
1 answer

How to get measure value for certain date range in MDX?

I am new to MDX and for now it looks like some hell to me. I have a measure called Sales KG. It calculate sales amount based on table AData where I have column named Data_Date. I need to get Sales KG value for specified range of dates. The problem…
Kosmo零
  • 4,001
  • 9
  • 45
  • 88
0
votes
1 answer

SSAS MDX PrevMember within calculated measure not working

Please could you assist. I am using the following expression to obtain the inflow for the same week for the previous month. ([Time].[Week Commencing Date].CurrentMember.PrevMember, [Measures].[_Inflow]) This appears to be returning results, however…
0
votes
1 answer

How to filter a table component by dates in range of parameters in Pentaho CDE?

I'm creating a dashboard, which includes some selectors, table component and I should add date input or date range input (would be even better) to filter the data in the table. However I can't figure out how to pass the parameters in the mdx query -…