June 1, 2017 at 2:44 pm
Hi All
Still planning my DW and I want to ask this question. I work in a "call centre" let's say where we record incoming calls, outgoing calls and missed calls all in separate tables
but with very similar data (start / end time etc.) and maybe one or two extra fields for each type of call.
I'd like to be able to store all of this data in one fact table and have an identifier (dimension) as to the call type.
I would use the original 3 tables primary keys (incall, outcall, missedcall) as a compound key (including dimension keys) and I think that would work well.
Any thoughts or glaring omissions on this principle?
Thanks
Mattie
June 1, 2017 at 6:03 pm
Yes. A "fact table" is a duplication of data that must be separately maintained. It would probably be better to create what is known as a "Partitioned View" and reference that as if it were a single table.
As a bit of a sidebar, most phone systems record all calls in a single table to begin with. Why has it been split to 3 to begin with?
--Jeff Moden
Change is inevitable... Change for the better is not.
June 1, 2017 at 7:28 pm
Couldn't you model it like this?
CREATE TABLE CallsFact (
SurrogateCallKey INT IDENTITY
, CallerID INT
, CallType VARCHAR(8)
, StartTime DATETIME
, EndTime DATETIME
, OriginalPK INT
);
Then you calculate CallDuration = DATEDIFF(minute, StartTime, EndTime)
Rob Collie modeled this in his book on DAX... he creates a simple data warehouse for it. The files are available at http://www.powerpivotpro.com (I want to say it's Chapter 17).
June 2, 2017 at 3:19 am
pietlinden - Thursday, June 1, 2017 7:28 PMCouldn't you model it like this?
CREATE TABLE CallsFact (
SurrogateCallKey INT IDENTITY
, CallerID INT
, CallType VARCHAR(8)
, StartTime DATETIME
, EndTime DATETIME
, OriginalPK INT
);Then you calculate CallDuration = DATEDIFF(minute, StartTime, EndTime)
Rob Collie modeled this in his book on DAX... he creates a simple data warehouse for it. The files are available at http://www.powerpivotpro.com (I want to say it's Chapter 17).
Awesome, thank you.
Mattie
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply