Forum Discussion
Calculate row data from two different tables using the filter
- Anonymous9 years ago
This will be come significantly easier if you create a "lookup table" that holds all the departments.
Then it is simply:
Total Est := SUM('Estimates'[EstIncoming])
Total Real := SUM('Real'[Incoming])
Delta := [Total Real] - [Total Est]
When creating your summary table, you would place Departments out of the new lookup table on rows (which would cause both fact tables to be filtered, via the magic of the relationships you create).
One way to create the lookup table, is to use the "Calculate Table" on the modeling ribbon:
Departments = DISTINCT(UNION(VALUES(Real[Dept]), VALUES(Est[Dep])))
Don't forget to relate it back to both your fact tables.
This will be come significantly easier if you create a "lookup table" that holds all the departments.
Then it is simply:
Total Est := SUM('Estimates'[EstIncoming])
Total Real := SUM('Real'[Incoming])
Delta := [Total Real] - [Total Est]
When creating your summary table, you would place Departments out of the new lookup table on rows (which would cause both fact tables to be filtered, via the magic of the relationships you create).
One way to create the lookup table, is to use the "Calculate Table" on the modeling ribbon:
Departments = DISTINCT(UNION(VALUES(Real[Dept]), VALUES(Est[Dep])))
Don't forget to relate it back to both your fact tables.