Can anyone explain to me what exactly is going on behind the scenes with the following two queries? they seem to exhibit the same results, but which is "better" for filtering a measure in tabular model dax across a many-to-many relationship...
Here is the (pretty standard) model: FactData ---> Account <--- AccountCustomerM2M ---> Customer
Example 1:
SumAmountM2M - v1 :=
IF (
COUNTROWS ( ALL ( Customers ) ) > 0,
CALCULATE ( SUM ( 'FactData'[Amount] ), AccountCustomerM2M ),
SUM ( 'FactData'[Amount] )
)
Example 2:
SumAmountM2M - v2 :=
IF (
ISCROSSFILTERED ( 'Customers'[CustomerKey] ),
CALCULATE ( SUM ( 'FactData'[Amount] ), AccountCustomerM2M ),
SUM ( 'FactData'[Amount] )
)
Thanks for your help! :)