mdx

MDX PeriodsToDate Function

被刻印的时光 ゝ 提交于 2019-12-12 01:47:17
问题 I am unable to get periodsToDate to work in MDX. I am getting the sum value when i am setting the periods to year level, but i am unable to get the sum values for quarters, months and days level. This is my query for the year level (which is working fine). With MEMBER [Measures].[Cumul Claim Cost] AS 'Sum ( PERIODSTODATE ( [Valuation Date].[Year].[All].Level, [Valuation Date].[Year].CurrentMember ) ,[Measures].[Cost] )' select {[Measures].[Cumul Claim Cost], [Measures].[Cost]} on columns, {

MDX and PeriodsToDate

 ̄綄美尐妖づ 提交于 2019-12-12 01:29:54
问题 I'm very new to MDX so I hope this is a simple question for a MDX expert. I have the following expression SUM(PeriodsToDate([Accounting Date].[(All)]),[Measures].[Amount]) which this piece works as expected. I need to add a filter or IIF statement that basically does the following: IF SUM(PeriodsToDate([Accounting Date].[(All)]),[Measures].[Amount]) < 0 Then 0 Else SUM(PeriodsToDate([Accounting Date].[(All)]),[Measures].[Amount]) 回答1: I'm afraid it's impossible to do with pre-aggregated data.

How market growth for each product under that particular market would be same?

会有一股神秘感。 提交于 2019-12-12 00:36:52
问题 I have All_Product hierarchy in All_product dimension. strength-->product-->market I want calculation for product growth and market growth on monthly basis((current-prev)/prev). I used scripts to calculate product growth (wrt product) and market growth (wrt market) which working fine but how to show for market growth with respect to each product. eg: market growth for each product under that particular market will be same example: I have market m1 and under market m1 having products p1,p2 and

MDX on multiple hierarchical dimensions

流过昼夜 提交于 2019-12-11 23:17:19
问题 2 hierarchical dimensions (for location and time) are defined on a cube. My question is about possibility of writing a single MDX query for retrieving following structure. I mean writing a single query for obtaining values V1, V2, V3 and V4: The obvious way is to use multiple MDX queries. Just wondering if there is some magic syntax in MDX. 回答1: Try: SELECT { [Measures].[Some Measure] } ON 0, { [Location].[Level 1].[Level 1].Members* [Date].[Year].[Year].Members* [Location].[Level 2].[Level 2

ssas 2005 mdx get total

╄→гoц情女王★ 提交于 2019-12-11 19:40:04
问题 I have this MDX query select { [Measures].[Sold value] ,[Measures].[Units] ,[Measures].[Sales baskets] ,[Measures].[ATV] ,[Measures].[AUT] } on columns , filter( nonempty( {[Branch].[Branch].&[5] *[Receipt No - Sales].[Receipt No].[Receipt No]} ), [Measures].[Sold value] >= 50 ) on rows from Rmis where [Time].[Day].&[20131218] Which generates following result: How can I get the total of these measures of the above result set? The total should use the aggregation defined in the cube. 回答1: with

SSAS linking a date dimension to an interval columns

随声附和 提交于 2019-12-11 16:59:39
问题 I have the following fact table : ID_Activ Date_Start Date_End ID_session DayOfWeek Time_Start Time_End 1 01/02/2018 15/02/2018 11 4 08:00:00 10:00:00 2 01/02/2018 15/02/2018 21 4 09:00:00 10:00:00 3 01/03/2018 15/03/2018 31 2 09:00:00 10:00:00 I have a conventional dimensions date, and a custom dimension time with hours, minutes and seconds. I would like to slice or dice using these dimensions to get this output: Date hour Count_session 01/02/2018 08 1 01/02/2018 09 2 01/02/2018 10 2 08/02

Filtering hierarchies in MDX WITH clause

好久不见. 提交于 2019-12-11 16:08:43
问题 By using the answer of MDX on multiple hierarchical dimensions I have the following MDX query: with member L1Y1 as ([Dim Location].[Hierarchy].[Center].&[1], [Dim Date].[Calendar Date].[Year].&[2010], [Measures].[x]) select ([Dim Attribute].[Parent Code].&[10000]) on 0, ({L1Y1}) on 1 from DS Now the problem is how to filter the L1Y1 based on its children. For example suppose we want to filter it so that only season 2 and month 7 included in the query. The following query output is the same as

MDX: generate hierarchy level within RDL report

断了今生、忘了曾经 提交于 2019-12-11 15:55:21
问题 Let's say, we have a cube with dimention 'Grocery store', which has 2-level hierarchy: Fruits & Vegetables Dep. Fruits Vegetables Tomatoes Cucumbers Bakery Dep. Milk Dep. The question is - how can I add hierarchy level within mdx query of RDL-report, so that 'Tomatoes' and 'Cucumbers' members would move to the new 3rd level under native 2nd level 'Vegetables'. I need to do that without any changes to the Cube, all by means of pure mdx only. When I tried to build a calculated set for the

UNION in SSAS MDX query

回眸只為那壹抹淺笑 提交于 2019-12-11 15:26:51
问题 Is it possible to write UNION in SSAS MDX query ? For Example : `SELECT {[Measures].[Sales Amount],[Measures].[Tax Amount]} ON COLUMNS, {[Date].[Fiscal].[Fiscal Year].&[2002], [Date].[Fiscal].[Fiscal Year].&[2003]} ON ROWS FROM [Adventure_Workenter code heres_1] WHERE ([Sales Territory].[Southwest]) UNION SELECT {[Measures].[Sales Amount], [Measures].[Tax Amount] } ON COLUMNS, {[Date].[Fiscal].[Fiscal Year].&[2002], [Date].[Fiscal].[Fiscal Year].&[2003]} ON ROWS FROM [Adventure_Works_2] WHERE

MDX DateAdd function over a set of tuples

梦想的初衷 提交于 2019-12-11 15:06:20
问题 I am trying to create a set of dates using DateAdd() function but I am getting errors while trying to pass a set of tuples as parameter. The below code returns a member but I am looking for a set of new dates. WITH Member [EFF INJ DT] AS DATEADD("M",12, [INJURY DATE].CurrentMember) SELECT {[EFF INJ DT]} ON COLUMNS, [INJURY DATE].[DATE].Members ON ROWS FROM [WVWC DATA CUBE FROI SROI] I have the following attempt: WITH Set [EFF INJ DT] AS DATEADD("M",12, [INJURY DATE].CurrentMember) SELECT {