Forum Discussion
mikeng
8 years agoFrequent Visitor
calculation using 2 fact tables
Hi guys, I'm struggling for days on this problem. So I have 2 fact tables (assume that they are linked by all necessary Dimension tables): Table A: which contains value (USD) Table B: allocation ...
- 8 years ago
Ashish_Mathur
8 years agoSuper User
Hi,
Share the exact expected result.
mikeng
8 years agoFrequent Visitor
Sorry Table B rate was wrong! I've just corrected it.
So sorry about that.
Mike
- Ashish_Mathur8 years agoSuper User
- mikeng7 years agoFrequent Visitor
Thank you very much!
I've corrected the allocation table (Table B) - it's my mistake in the first place anyway :). Your data model works excellently!
In my actual data, it's a bit more complex which include other variables such as months, the forecast period (12 months forecast in Jan, 12 months forecasted in Feb, etc.) I use the same approach but I think I was wrong when merging the tables: I use Table A (the $$$ table) not Table B (the rate table) with Left join. So as table A has more duplicates (Forecast period, Months, etc.) so the merging results in a lot of duplicates.
Thank you so much!
Mike
- Ashish_Mathur7 years agoSuper User
Hi,
Whom are you replying to?