| AK wrote: I have the following challenge: | | Two fact tables, with the same time grain. Let's say one has measure of | ''bytes'' and dimensions of date and host. The second is measureless and | it represents a relationship of hosts to departments over time so the | dimensions are groups, hosts and date. Hosts can belong to multiple | departments and can move in and out of departments so the second fact | represents daily snapshots of membership of hosts in groups. | ... | ... | What if I want to limit the report by group? I can get a set of | hosts that belong to this group for each date from fact two, but how do I | correlate this to fact one? | | IBL wrote: Below is a way of making the correlation using rules. | | You can run this agent from a browser, using the Internet Business Logic system at www.reengineeringllc.com | | Please note that the system can provide detailed English explanations of its reasoning on this-date the host this-host used this-measure units ======================================================= 20041021 host1 100 20041022 host1 120 20041023 host1 120 20041024 host2 200 the host this-host was in the dept this-dept on the date this-date ====================================================================== host1 dept1 20041021 host1 dept2 20041022 host1 dept2 20041023 host2 dept2 20041024 some-date1 is of interest some-date3 is of interest the department some-dept is in the organization sum a-number : on that-date2 between that-date1 to that-date3 a host in that-dept used that-number units = a-total ------------------------------------------------------------------------------------------------------------------ betwen the dates that-date1 to that-date3 , the hosts in that-dept used that-total units some-date2 is in the range some-date1 to some-date3 on that-date2 a host in that-dept used some-number units ------------------------------------------------------------------------------------- on that-date2 between that-date1 to that-date3 a host in that-dept used that-number units the host some-host was in the dept some-dept on the date some-date ------------------------------------------------------------------- the department that-dept is in the organization the host some-host was in the dept some-dept on the date some-date on that-date the host that-host used some-measure units ------------------------------------------------------------------ on that-date a host in that-dept used some-measure units on some-date the host some-host used some-measure units ------------------------------------------------------- that-date is of interest some-date1 is of interest some-date2 is of interest some-date3 is of interest that-date1 is less than or equal that-date2 that-date2 is less than or equal that-date3 ---------------------------------------------------- that-date2 is in the range that-date1 to that-date3