mdx

SSRS MDX - Display measure upto date in fiscal year, display all children in fiscal year

偶尔善良 提交于 2019-12-13 21:10:27
问题 Using this script SELECT [Date].[Fiscal Year-Month].[Fiscal Year].&[2012/13].Children ON ROWS , [Measures].[Capacity] ON COLUMNS FROM [CubeName] I get the following result: Capacity Apr-12 81.07% May-12 81.99% Jun-12 82.29% Jul-12 82.13% Aug-12 82.47% Sep-12 79.10% Oct-12 (null) Nov-12 (null) Dec-12 (null) Jan-13 (null) Feb-13 (null) Mar-13 (null) What I am looking to do is produce a monthly report for the position upto the end of July showing the values for each month, therefore I wish to

Grouping SSAS members into buckets using MDX

别说谁变了你拦得住时间么 提交于 2019-12-13 20:05:52
问题 SSAS and MDX newbie here. If I have an SSAS cube with Geography, Product as the dimensions and total sales as a measure. The following elements are under geography: EAST WEST NORTH SOUTH MID-ATLANTIC MOUNTAIN NORTH-WEST Products are: 1 2 3 4 For Product ID = 1, is there a way I can group some members into a "rest of the country" bucket and aggregate the sales? Meaning, the expected output is: Product ID Geography Sales 1 East 100 1 West 200 1 North 300 1 South 400 1 RestOfNation 1200 2 East

MDX function to find if a Member IsMemberOf a set

牧云@^-^@ 提交于 2019-12-13 15:49:26
问题 This feels like a really basic question, because it's a really basic function I'm looking for. I know you can do this: ([Dimension].CurrentMember IS [Dimension].[AParticularMember]) and you get a logical 1 or 0 as the function value. But how do you do this kind of thing, without concatenating IS functions in a whole lot of ugly ORs: ([Dimension].CurrentMember ISAMEMBEROF {[Dimension].[AMember],[Dimension].[AnotherMember],[Dimension].[YetAnotherMember]} ) ? This is really basic set operations,

How can remove the null values?

一个人想着一个人 提交于 2019-12-13 14:21:50
问题 How can I remove the null values in the bottomcount, ie. i only want to see the products with actually sold units, I have tried with nonempty and non empty without success. with member [Measures].[Amount Sold] as ([Measures].[Internet Sales Amount]), format_string = "currency" select {[Measures].[Amount Sold]} on columns, bottomcount( order( {[Product].[Product].Members}, ([Measures].[Amount Sold]), bdesc), 5 )on rows 回答1: You could filter [Product].Members using NOT ISEMPTY() to exclude all

Calculated measure/dimension

自作多情 提交于 2019-12-13 12:32:29
问题 I'm relatively new to MDX and am trying to accomplish what I think should be an easy thing, but I haven't found any solution. I have a sales cube and one of the measure is profit which can be negative or positive. I want to get one measure which is effectively the sum of positive profit, i.e. only include in the new measure those profit numbers that have a positive profit. The trick here is this is on the row detail level and something like WITH MEMBER Measures.PositivePNL as IIF (Measures

Conditional MDX Query to calculate sum and average

三世轮回 提交于 2019-12-13 08:28:49
问题 I have a sales(SalesID, GoodsType, GrossSale, AverageSale). I was to write two MDX expression in MS Visual Studio SSAS cube's Calculation tab to calculate Sum of GrossSale and Average of GrossSale where GoodsType is "Food". If someone please write the MDX expression for me? 回答1: In many cases, you rely on the Analysis Services engine to do the summing for you. To get the sum for the measure [GrossSales] for a single attribute member 2 for attribute DataType of dimension Dim , assuming the

How do I calculate the sum total of a group in MDX?

吃可爱长大的小学妹 提交于 2019-12-13 07:55:12
问题 I need to create a Calculation in the SQL Server Data Tools. Imagine that in my OLAP structure I have a City and a Seller Dimensions, and a fact. And in the City Dimension I have a city, a state, and a Population, and this is a Measure in a Dimension. I need to sum the Population in the cities which have sales. But I can't sum only the cities with sales, I can only show the state's total population. One seller can sell in many cities. Example: I'll filter by seller John and the query returns

What transformations can be performed in MDX?

醉酒当歌 提交于 2019-12-13 05:46:52
问题 I'm new to MDX. I understand that MDX is a query language, not a data transformation language. However, I'm also aware that this distinction is partially meaningless; there is no clear line between transformation and reporting, and every query language is capable of some transformation. Proficiency in a query language requires knowing what transformations are reasonable, and which require a redesign of the underlying schema. From what I've seen of MDX, it clearly has features designed for

Alias MDX Query SSAS

浪子不回头ぞ 提交于 2019-12-13 05:36:08
问题 WITH MEMBER [Measures].[NetPromoterScore] AS (IIF(([Measures].[Net Promoter Score] = 1/0 OR [Measures].[Net Promoter Score] = -1/0 OR ISEMPTY([Measures].[Net Promoter Score]) OR [Measures].[Avg Revenue Per Unit] = 1/0 OR [Measures].[Avg Revenue Per Unit] = -1/0 OR ISEMPTY([Measures].[Avg Revenue Per Unit]) ), NULL, [Measures].[Net Promoter Score])) MEMBER [Measures].[AvgRevenuePerUnit] AS (IIF(([Measures].[Net Promoter Score] = 1/0 OR [Measures].[Net Promoter Score] = -1/0 OR ISEMPTY(

MDX - Always return at least one row even if no data is available

一曲冷凌霜 提交于 2019-12-13 05:04:38
问题 I am using the following MDX to pull a parameter: WITH MEMBER [Measures].[Label] AS [Dim].[Hier].CURRENTMEMBER.NAME MEMBER [Measures].[Value] AS [Dim].[Hier].CURRENTMEMBER.UNIQUENAME SELECT { [Measures].[Label] , [Measures].[Value] } ON 0, NONEMPTY([Dim].[Hier].children, [Measures].[Measure]) ON 1 FROM [Cube] WHERE ( -- Criteria ) Sometimes, when selecting certain filtering criteria the query results in empty set. Instead, I would like it to display "N/A" in both value and label. Is it doable