MaxSmart79
Programmer
How does Webi's Merge Dimensions work when you merge on multiple fields?
For example, I want to create a left join, showing all records in Query1 with details from Query2 when there is a match.
So, I merge Query1 to Query2 using two different merged dimensions, Field1 and Field2.
I show Query1.[Field1] and Query1.[Field2] on the report for the first two columns.
I want additional columns showing fields from Query2 in rows where there is a matching Query2 row, or a blank where there is no match (ie, a left join).
I create a Detail-type variable based on Query2.Field1, "=Query2.Field1", called "VarQ2F1". I drop this on the report, and it shows a bogus VarQ2F1 value equal to Query1.Field1 for every row - even in rows where it *should* be blank because there is no matching row in Query2 where Field1 and Field2 both match. Why?
I create a Detail-type variable based on Query2.Field1, "=Query2.Field3". It is showing correct Query2.Field3 values, but it is showing them on rows where there is a match based on Field1 but NOT a match based on Field2. Why?
Is Merged Dimensions joining using an "OR" logic when I merge multiple dimensions? Is there any way to create "AND" logic, so it only shows Query2 data on rows where there is a match on BOTH joined dimensions? (in SQL, this would be Query1 LEFT JOIN Query2 ON Query1.Field1=Query2.Field1 AND Query1.Field2=Query2.Field2)
For example, I want to create a left join, showing all records in Query1 with details from Query2 when there is a match.
So, I merge Query1 to Query2 using two different merged dimensions, Field1 and Field2.
I show Query1.[Field1] and Query1.[Field2] on the report for the first two columns.
I want additional columns showing fields from Query2 in rows where there is a matching Query2 row, or a blank where there is no match (ie, a left join).
I create a Detail-type variable based on Query2.Field1, "=Query2.Field1", called "VarQ2F1". I drop this on the report, and it shows a bogus VarQ2F1 value equal to Query1.Field1 for every row - even in rows where it *should* be blank because there is no matching row in Query2 where Field1 and Field2 both match. Why?
I create a Detail-type variable based on Query2.Field1, "=Query2.Field3". It is showing correct Query2.Field3 values, but it is showing them on rows where there is a match based on Field1 but NOT a match based on Field2. Why?
Is Merged Dimensions joining using an "OR" logic when I merge multiple dimensions? Is there any way to create "AND" logic, so it only shows Query2 data on rows where there is a match on BOTH joined dimensions? (in SQL, this would be Query1 LEFT JOIN Query2 ON Query1.Field1=Query2.Field1 AND Query1.Field2=Query2.Field2)