olap

Star schema [fact 1:n dimension]…how?

蹲街弑〆低调 提交于 2019-12-30 10:00:47
问题 I am a newcomer to data warehouses and have what I hope is an easy question about building a star schema: If I have a fact table where a fact record naturally has a one-to-many relationship with a single dimension, how can a star schema be modeled to support this? For example: Fact Table: Point of Sale entry (the measurement is DollarAmount) Dimension Table: Promotions (these are sales promotions in effect when a sale was made) The situation is that I want a single Point Of Sale entry to be

Use CSV or Text file as a data source for SSAS cube

心不动则不痛 提交于 2019-12-25 16:59:11
问题 Can we have a CSV or Text file as a data source for SSAS cube. I deal with lots of data and maintain SSAS cubes (ROLAP) for analyzing the same. The data(~2 GB) comes in every hour as a formatted text file which I upload to a DB which acts as a data source for the cube. The cube then fetches this data from the DB and processes it. I would like to process the cube directly using the text file. This can save a lot time. 回答1: I've never really tried this, but I think this is possible if you have

Transform a parent/child table to a fixed column dimentional table

三世轮回 提交于 2019-12-25 07:59:51
问题 I've a relational table (id, parentId, name) which I'd like to convert to a flattened dimentional table (id, Level1, Level2, Level3, Level4) I'm ok fixing the depth at 4 deep. I've made progress with a recursive CTE and pivot, but the result set isn't right I get Id Name Level1 Level2 0 Root NULL NULL 1 NULL L1 NULL but I need Id Name Level1 Level2 0 Root NULL NULL 1 Root L1 NULL here's what I have to date with rcte as ( select h.id ,h.parent_id ,h.name ,1 as HierarchyLevel FROM RelTable h

Ordering by a generic calculated measure results in infinite recursion? (MDX)

邮差的信 提交于 2019-12-25 07:39:41
问题 I need to write a calculated measure that would show a share of Measure1 comparing to the total sum by any given dimension. I managed to do it like this: CREATE MEMBER CURRENTCUBE.[Measures].[Test] AS [Measures].[Measure1] / ( AXIS( 1 ).ITEM( 0 ).DIMENSION.LEVELS( 0 ).ITEM( 0 ), [Measures].[Measure1] ) But due to the generic nature of [Test] , it is not possible to order a dimension by this measure. SELECT [Measures].[Measure1] ON 0, ORDER( [Dimension1].MEMBERS, [Measures].[Test] ) ON 1 FROM

Two independent measures based on two time hierarchies

人盡茶涼 提交于 2019-12-25 04:17:13
问题 I've got a simple cube with a fact table which has a date field among others and connected it with a time dimension which has 2 hierarchies. What I want to do is create one measure that will be filtered only by the one time hierarchy and a second one for the second time hierarchy. Basically this: Measure1 ----> Cannot be affected by filtering of time_hierarchy2 and gets filtered only by time_hierarchy1 And the same for Measure2. With what I've tried so far I can't do this because whenever I

Previous Equivalent MTD Across Multiple Months

◇◆丶佛笑我妖孽 提交于 2019-12-25 03:41:08
问题 If today's date is 11 July 2008 then the MTD sum is for the range {01 July 2008 - 11 July 2008}. The previous equivalent MTD period in June is {01 June 2008 - 11 June 2008}. The previous equivalent MTD period in May is {01 May 2008 - 11 May 2008}. I have the following MDX script: WITH MEMBER [Measures].[PrevEquivalentMTD] AS //SUM ( ParallelPeriod ( [Date].[Calendar].[Month] ,1 ,[Date].[Calendar].CurrentMember ) ,[Measures].[Internet Sales Amount] ) MEMBER [Measures].[PrevEquivalentMTD_v2] AS

Filter for Dates which are in Caption in PivotTables which come from Olap cube

▼魔方 西西 提交于 2019-12-24 20:32:54
问题 I want to Filter Dates which stands between two Dates within a Olap Cube. My code so far: Set pvtField = pt.CubeFields("[DimTime].[Year-Quarter-Month-Day]") ' Add item to the Report Filter pvtField.CreatePivotFields pvtField.Orientation = xlRowField With ActiveSheet.PivotTables(1).PivotFields("[DimTime].[Year-Quarter-Month-Day].[Day]") Debug.Print end_date 'return Date in the format 'dd.mm.yyyy', it is a valid Date Debug.Print start_date 'return Date in the format 'dd.mm.yyyy', it is a valid

Merging two tuples in the same hierarchy into one (in MDX WITH SET command)

烂漫一生 提交于 2019-12-24 20:26:45
问题 The following MDX query returns measure X on 3 tuples: 2001, 2002-1 and 2002-2. What I am trying to do is merging 2002-1 and 2002-2 into one tuple and have the measure X for 2001 and 2002-1&2. Using SUM function is not possible. Because measure X is used on other axis. with member v as [Measures].[X] set w as {[Dim Date].[Calendar Date].[Year].&[2001], [Dim Date].[Calendar Date].[Month].&[1]&[2002], [Dim Date].[Calendar Date].[Month].&[2]&[2002]} select w on 0, v on 1 from [DS]; 回答1: You can

MDX - Converting Member Value to CDate

若如初见. 提交于 2019-12-24 14:50:13
问题 I need to convert a member value from this format dd.MM.yyyy into a CDate. This was my trial: cdate(format([Date].[Date].CURRENTMEMBER.MEMBER_VALUE, "dd.MM.yyyy")) Source: http://www.datazen.com/blogs/post/working-with-dates-in-datazen-3-0 However, I get a type mismatch error, because the format function ist not working properly. I'm using a Microsoft Analysis Server. Do someone know a solution for this issue? 回答1: You need to create a measure when to extract the date. Here is a possible

MDX query from PHP

丶灬走出姿态 提交于 2019-12-24 09:27:43
问题 Is it possible to create an MDX query for JasperServer using PHP as a host language, given that my underlying relational database is MySQL? What I would like to do is send the query to JasperServer in order to create an OLAP View and receive the view as a result (preferably in some text-based format, as oposed to an image or PDF). I'm using JasperServer CE 4.2.1. As a side note, is it even correct to think about making MDX queries from you application, just like you would make SQL queries? If