Microsoft Certified: Fabric Analytics Engineer AssociateImplement and manage semantic models (30-35%)Medium

A data modeler is developing a semantic model in Microsoft Fabric. The model includes a 'Sales' fact table and a 'Product' dimension table. There is a many-to-many relationship between 'Products' and 'Sales' due to a 'ProductBundle' bridge table. The modeler needs to calculate the total sales for products included in specific bundles. Which DAX function is most appropriate for establishing a filter context across this many-to-many relationship for calculation purposes?

  1. ARELATED
  2. BLOOKUPVALUE
  3. CCROSSFILTER
  4. DCALCULATE
Show answer & explanation

Correct answer: C. CROSSFILTER

The CROSSFILTER function is specifically designed to modify or ignore filter directions in relationships within DAX calculations. It is crucial for correctly propagating filters across many-to-many relationships, such as those involving bridge tables, to perform accurate aggregations.

Why the other options are wrong

  • A. RELATED is used to retrieve a single value from the 'one' side of a one-to-many relationship, not for filtering across many-to-many relationships.
  • B. LOOKUPVALUE is used to retrieve a value from a table based on matching values in another column, similar to RELATED but with more flexibility, not for modifying filter contexts.
  • D. CALCULATE is a powerful function for modifying filter context, but it relies on existing or modified relationship filters. CROSSFILTER is used *within* CALCULATE or other functions to explicitly define how a relationship should be filtered for a specific calculation.

CROSSFILTER DAX Function

The CROSSFILTER DAX function modifies the filter direction of a specified relationship within a calculation, enabling correct filtering across many-to-many relationships or overriding default filter behavior.

  • Used in DAX expressions to control relationship filter behavior.
  • Crucial for many-to-many relationships, especially with bridge tables.
  • Can change filter direction to Both, OneWay, or None.

Memory trick: Cross the Filter, Don't Get Lost in the Many-to-Many!

More Implement and manage semantic models (30-35%) questions