Join two fact tables?

View previous topic View next topic Go down

Join two fact tables?

Post  Mikaelo on Wed Sep 18, 2013 5:17 pm

Hello everyone, I'm new working with Data Warehouse and I'm a little confused with all terms and logic about DW.

By now my question is if I need to join two fact tables or exists another way to solve the next scenario:

I need to create a kind of inventory kardex. I have two major sources (each one about 1.5M rows per year) and one source should increase the existence of the product that is being analyzed, and the second source will decrease the existence of the same product. My point of view is that I need two fact tables (one for each source) and then make all calculation needed using a join between them to create the kardex result, also I need to show all documents from the sources ordered by dates.

Am I right? Are there a better solution?

Tks in advance for your help.

PS: Sorry for grammar, I'm not an English speaker (or writer hahahaha)

Mikaelo

Posts : 1
Join date : 2013-09-18

View user profile

Back to top Go down

Re: Join two fact tables?

Post  ngalemmo on Wed Sep 18, 2013 7:16 pm

If you are trying to track the inflow and outflow of inventory, there is no reason that this could not be handled by a single fact table. Just use positive and negative quantity values.
avatar
ngalemmo

Posts : 3000
Join date : 2009-05-15
Location : Los Angeles

View user profile http://aginity.com

Back to top Go down

Re: Join two fact tables?

Post  Kumpu on Thu Sep 19, 2013 6:45 pm

Fact and dimension are not by source, but you are already, try to access these facts from the product dimension atleast you will have a complicated SQL but your requirement will be satisfied

thanks

Kumpu

Posts : 2
Join date : 2013-09-17

View user profile

Back to top Go down

Re: Join two fact tables?

Post  Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum