mdx

MDX ORDER by multiply measures

五迷三道 提交于 2019-12-11 12:21:07
问题 Suppose that i have next MDX query select { [Measures].[Measure1], [Measures].[Measure2], } on columns, { ORDER([Dim].Children, [Measures].[Measure1], desc) } on rows from [Cube] which selects two measures and sorts rows by first one. How can sort by two measures, frist sort by Measure1 and then sort by Measure2? 回答1: This works on AdvWrks for me: SELECT { [Measures].[Reseller Order Quantity] ,[Measures].[Reseller Sales Amount] } ON 0 ,Order ( Order ( [Product].[Product].[Product].MEMBERS ,

MDX average function counting on

ぃ、小莉子 提交于 2019-12-11 12:09:41
问题 I stumbled upon a problem which I cannot resolve. For my academical project I have a cube representing an airline's data warehouse. In this airline, passengers fill out a qustionnaire with 5 questions, rating various aspects of the flight from 1 to 10 I was asked to write an MDX query to show how their overall grade of the flight ( average of five grades ) depending on the class they were in. This is my query: WITH MEMBER [Average Grade1] AS [Measures].[Grade1] / [Measures].[Flight Count]

Retrieving Data Type of Measures from an MDX Query/CellSet in C#

人走茶凉 提交于 2019-12-11 11:19:34
问题 (I am using C# 4.0. I am connecting to a data cube via the Microsoft.AnalysisServices.AdomdClient namespace/library.) If I understand correctly there is exactly one axis in an MDX SELECT statement that will contain measures; the others will be based on the other dimensions. My immediate task (the larger task is irrelevant, I believe) is given an MDX SELECT statement such that the first axis contains said measures, I need to programmatically determine the data type of the all of the cells

MDX How to calculate measure against dimension without displaying members in results

◇◆丶佛笑我妖孽 提交于 2019-12-11 11:14:18
问题 Could someone please help me with the below MDX problem: I got the dataset like the one below: With Set Range1 as {[Date].[Calendar].[Month].&[2008]&[1] :[Date].[Calendar].[Month].&[2008]&[12]} Set Range2 as {[Delivery Date].[Calendar].[Month].&[2008]&[1]: [Delivery Date].[Calendar].[Month].&[2008]&[12]} MEMBER measures.A as [Measures].[Internet Order Count] + [Measures].[Reseller Order Count] select {[Measures].[Internet Order Count],A} on columns, non empty( [Sales Territory].[Sales

MDX Aggregated Row (display subtotals on the columns)

旧巷老猫 提交于 2019-12-11 10:35:14
问题 I have a very simple MDX query. SELECT NON EMPTY {[Measures].[ing_pc_hh_presupuestadas], horas,[Measures].[ing_pc_hh_faltantes],[Measures].[ing_pc_faltante] } ON COLUMNS, NON EMPTY CROSSJOIN([proyecto].[codigo proyecto].[All].CHILDREN, [proyecto].[descripcion proyecto].[All].CHILDREN, [concepto].[descripcion concepto].[All].CHILDREN) ON ROWS FROM [TACO V1] WHERE {([concepto].[id concepto].&[1]) , ([concepto].[id concepto].&[5])} This is the idea. A project has 2 concepts. So, in this query, I

Account for tied ranks

五迷三道 提交于 2019-12-11 10:31:39
问题 I'm using the following: WITH SET [myset] AS Order ( { [Customer].[Country].[Country].MEMBERS * [Customer].[Customer].[Customer].MEMBERS } ,[Measures].[Internet Sales Amount] ,ASC ) MEMBER [Measures].[rank] AS Rank ( ( [Customer].[Country].CurrentMember ,[Customer].[Customer].CurrentMember ) ,[myset] ) MEMBER [Measures].[newrank] AS IIF ( [myset].Item( [Measures].[rank] - 1).Item(0).Name <> [myset].Item( [Measures].[rank] - 2).Item(0).Name ,1 , ([myset].Item([Measures].[rank] - 2),[Measures].

How to get current MDX in Tableau?

↘锁芯ラ 提交于 2019-12-11 09:40:39
问题 Given a PivotTable in Tableau, is there a way to know the associated MDX Query? I would help my understanding current pivot table and fix potential misconstructions. 回答1: Unlike ProClarity and some other MDX-generating tools, you can't see the MDX being created while in the UI. However, if you open up the \My Documents\My Tableau Repository\Logs folder, you'll see Desktop's logs. You can open those up and see each and every MDX statement that has been executed against SSAS. Hope this helps!

Using GENERATE to concatenate Rank and Member Name

Deadly 提交于 2019-12-11 08:46:47
问题 The following is from MSDN: http://msdn.microsoft.com/en-us/library/ms144726.aspx WITH SET OrderedCities AS Order ([Geography].[City].[City].members , [Measures].[Reseller Sales Amount], BDESC ) MEMBER [Measures].[City Rank] AS Rank ([Geography].[City].CurrentMember, OrderedCities) SELECT {[Measures].[City Rank],[Measures].[Reseller Sales Amount]} ON 0 ,Order ([Geography].[City].[City].MEMBERS ,[City Rank], ASC) ON 1 FROM [Adventure Works] Would it be possible to use the GENERATE function to

How to display the total of a level as the value of its last child in MDX

烈酒焚心 提交于 2019-12-11 07:45:59
问题 I have an MDX query which lists a measure for all 'Week' and 'Day' levels in the OLAP database. For example SELECT { HIERARCHIZE( {[Business Time].[Week].members, [Business Time].[Date].members} ) } ON ROWS, { [Measures].[Quantity] } ON COLUMNS FROM [Sales] Where the measure is displayed for a Week though, instead of showing the total of all the Day values, I would like to show the value for the last day within the week. For example Week 1: 12 15 Sept: 10 16 Sept: 20 17 Sept: 12 18 Sept: 15

MDX Difference between dates non null and of the same dimension

岁酱吖の 提交于 2019-12-11 06:36:55
问题 Hi I need to calculate No. of days between Counts so the dataset is count I have created a member of the last date, this returns the last date across the whole dataset as a start but not sure how to proceed. Is it possible to do this in MDX? if so how? Thank you MEMBER [Measures].[Last date] AS MAX([Date].[Full Date].[Full Date].MEMBERS, iif( [Measures].[Count] = 0, null, [Date].[Full Date].CurrentMember.MemberValue ) ) 回答1: The following example will help. But please note that it will count