olap

merge statement temporary table - how to direct data into a local array?

狂风中的少年 提交于 2019-12-12 01:07:08
问题 We're having a tough time debugging because our retired predecessor has a query statement that puts pulled data into a series of temporary tables before uploading to the database. It's not working now (we added items to TestPatterns table, and running for tp7 instead of tp21 so data may differ) and we're having a tough time debugging it. If we could somehow print or access the data put in the temporary tables, maybe we could debug it better. Any ideas on how to debug this better, and maybe

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

Filter Last items of Pivot table (vba)

主宰稳场 提交于 2019-12-11 16:52:49
问题 SNapshot I have a pivot table that needs to show only the last 13 items (week). Below is teh code i used. However, what ever the Visible status of the item in the pivot, it does not change even forcing it to True/False. Already tried an if/else statement but still Visible state does not change. Appreciate help on this. Thanks! Sub ShowLastXDays() Dim pi As PivotItem Dim lLoop As Long Dim pt As PivotTable Dim pf As PivotField Dim lCount As Long Dim lDays As Long Dim Count As Long On Error

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

How to create a period over period Measurement in MDX?

旧街凉风 提交于 2019-12-11 13:39:02
问题 I'm fairly new to MDX queries, and I'm having trouble understanding how I might compute a period over period measurement. For example say I have a metric like revenue, and I'm breaking that revenue out over time say on a Month to Month basis. How would I calculate the change from Month to Month of that revenue as a percent? Now let's say I want to calculate that generically over any period, quarter to quarter, year to year, month to month, or even compare it with identical periods from prior

Excel 2010 Pivot Table Filter - How to print multiple filter selection values

送分小仙女□ 提交于 2019-12-11 12:37:28
问题 Assume we have a country dimension which I use as an filter in Excel Pivot Table, datasource is a OLAP Cube. Now we choose some countries, the filter cell in excel is now named "(Multiple Items)" or a like, but I would like to print out / show the country names instead. How can I achieve this? Thanks 来源: https://stackoverflow.com/questions/4592830/excel-2010-pivot-table-filter-how-to-print-multiple-filter-selection-values

Is there a performance gain using + rather than Aggregate(Union

走远了吗. 提交于 2019-12-11 12:36:02
问题 I was looking at this post in MSDN: http://msdn.microsoft.com/en-us/library/ms145493.aspx It states that + and Union are equivalent ... not exactly in the following as Aggregate needs to be applied if I choose to use Union . It's more readable but is there any performance gain in choosing + over Aggregate(Union ? WITH MEMBER [Employee].[Employee].[blah] AS [Employee].[Employee].[Amy E. Alberts] + [Employee].[Employee].[Garrett R. Vargas] MEMBER [Employee].[Employee].[blahblah] AS Aggregate (

Building a local cube

ⅰ亾dé卋堺 提交于 2019-12-11 09:07:46
问题 I need to build a local .cub file for my Excel-using clients. I have scrounged together some VB code but it fails : ConnLocation = "LOCATION=C:\test.cub;" ConnDSN = "SOURCE_DSN=DSN=TEST;UID=test;PWD=pass;" ConnCreateCube = _ "CREATECUBE=CREATE CUBE [TestCube] (" & _ "DIMENSION [account_code]);" Connection = CreateObject("ADODB.Connection") Connection.Provider = "msolap" Connection.ConnectionString = _ ConnLocation & _ ConnDSN & _ ConnCreateCube I have trimmed this down to the above code and

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