Domanda

I have these 2 tables and I need to create a relationship between them so that I can import them into SSAS Tabular and run some analysis. The first table has RollingQuarter(Moving Quarter) data. The second is a basic Date table with Date as PK. Can anyone suggest ways to create a relationship with these? Ill be using SQL Server 2012.

I could re-create a new date table also. enter image description here

È stato utile?

Soluzione

I think you may have a rough time finding a relationship with these tables.

Your top data table is derived data. It's an average over three months, reported monthly. The Quantity column applies to that window, not to a particular date like all of the stuff in the second table. So what would any relationship really mean?

If you have the primary data that were used to calculate your moving average, then use those instead. Then you can relate dates between the two tables.

But if your analysis is such that you don't need the primary data for the top table, then just pick the middle of each quarter (March 15th 2001 for the first record) and use that as your independent variable for your time series on the top. Then you can relate them by that.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top