Set modifiers for metrics and dimensions from 2 tables shown in one chart
Hi All!
I've reached a point where my initial approach results in very bad performance on a large data volume. I believe it could be changed by changing the join condition and creating correct expressions in charts. I'm stuck here and would greatly appreciate your help in finding solution.
We have:
1. Fact table with > 6 dimensions and 1 metric. Dimensions DO NOT have all possible values (some of them are not populated and omitted).
2. Population table with 5 dimensions and 1 metric. All dimensions exist in Fact table and contain all range of possible values (nothing is missing).
Chart requirements for the Metric 'Rate':
1. One or two dimensions. For one dimensional chart a dimension is from Fact table which doesn't exist in Population. For 2-dimensional chart one dimension is from Fact table which doesn't exist in Population and another one is from Population table.
2. Expression:
2.1 sum up Fact's metric for Fact's Age Groups available for dimension(s).
2.2 sum up Population's metric for each Age Group. Other 4 Population's dimensions should include All possible values specified by a user.
2.3. Divide 2.1 by 2.2.
2.4 Sum up result from 2.3 for each value in dimension(s).
Performance is bad for large data volume when using option 1.
Could you please help me in creating correct formulas for Option 2 where I join tables by a composite key created out of 5 shared dimensions? We should not loose population values for Age Group if there are no fact values for some Race, Gender etc.
Attached is a test QVW . First tab is for option 1 (correct outputs). The second tab is for the second option where I need you help.