Measure evaluation process

Each value in the report, such as the $600 from the matrix visual, is computed according to the following four-step process:

  1. Initial Filter Context:
    • This includes all filters applied within and outside the report canvas by the report author
    • Selections on slicer visuals and the rows and columns of the table and matrix visuals represent on-canvas filters
    • Report, page, visual, and drillthrough filters represent off-canvas filters that also contribute to the initial filter context
  2. Filter Context Modified via DAX:
    • For base measures and other simplistic expressions, the initial filter context from the report is left unchanged
    • For more complex measures, the CALCULATE() function is invoked to further modify the initial filter context:
      • Via CALCULATE(), the initial filter context can be removed, replaced, or supplemented with an additional filter condition
      • In the event of a conflict between the initial filter context from the report (for example, slicers, report level filters) and the filter condition embedded in the DAX measure, by default, the DAX measure will override the report filter condition
  3. Relationship Cross-Filtering:
    • With each table filtered from steps 1 and 2, the filter context is transferred across cross-filtering relationships
    • In most cases, the filtered dimension tables filter the related fact tables via single direction cross-filtering
    • However, as described in Chapter 3Designing Import and DirectQuery Data Models, bidirectional cross-filtering allows the filter context to also transfer from the many side of a relationship to the one side 
    1. Measure Logic Computation:
      • The computation logic of the measure (for example, DISTINCTCOUNT(), COUNTROWS()) is finally evaluated against the remaining active rows for the given table or column referenced
      • For common and base measures, this is simply the set of remaining or active fact table rows
      • However, as shown in the following Dimension metrics section, other DAX measures will reference dimension tables, and thus it's important to understand how these tables are impacted by relationship filtering and DAX expressions 

    This four-step process is repeated for each value of the report independently. Consequently, reports and visuals which are dense in values require more computing resources to refresh and update based on user filter selections. Large tabular report visuals with many columns and rows are particularly notorious for slow performance, as this forces the DAX engine to compute hundreds or thousands of individual values.

    Although report authors and business analysts will not create DAX measures, it's important that they have a basic understanding of the filter context and measure evaluation processes. For example, the report author should understand the cross-filtering relationships of the data model (single or bidirectional) and how certain DAX measures impact the filters applied in reports. Similarly, business analysts should be able to explain to business users why certain report behaviors and results occur.
    ..................Content has been hidden....................

    You can't read the all page of ebook, please click here login for view all page.
    Reset
    3.15.3.167