Link to home
Start Free TrialLog in
Avatar of Jorge Prendes
Jorge Prendes

asked on

Multiple fact tables with different granularity

I have a primary fact table of Events with a bridge to another fact table of Interest that are tied by an Event Id. Each event can have multiple Interest. I'm able to get the correct Event & Interest counts.

The same Events fact table has another bridge to another fact table of Profiles, but this is linked by a Profile Code within the Event, instead of the Event Id. I'm able to get the correct Event counts with the correct distribution but the problem is that the Interest counts are always the same, the total sum of Interests.

The one thing I haven't tried is to include every Event Id in the Profile fact for every possible combination. I would imagine this could get huge and have a negative impact on performance.

I've attached the design and examples of correct results and of the  wrong Interest measure.
User generated imageUser generated imageUser generated image
Avatar of PortletPaul
PortletPaul
Flag of Australia image

You have to aggregate the profile based facts (a subquery) up to event level before joining to the event based facts.

Can you share the query you used that produced the wrong results please. I can then duggest a correction.
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.