FILTER CONTEXT AND ROW CONTEXT

Vaishali
2 min readOct 4, 2019

--

CONTEXT — Context is the layer of filtering It is applied to calculations.

Two types of Context:

  1. Filter Context
  2. Row Context

FILTER CONTEXT

  • The filter context is a set of column-based filters.
  • It can be modified by functions like CALCULATE().
  • Follows the one to many relationships automatically.

Example:

  1. Column = CALCULATE(SUM (‘Product’[DealerPrice]))

2. Column 2 = ‘Product’[DealerPrice] * ‘Product’[ListPrice]

ROW CONTEXT

  • Row context is effective when you create calculated columns or execute code inside an iterator function.
  • Exists in special DAX functions like SUMX and FILTER.
  • Does not follow relationship.
  • A row Context does not create a filter context.

Example:

  1. Column 5 = (‘Product’[DealerPrice] + ‘Product’[ListPrice])

2. Column 3 = SUM (Product[DealerPrice])

3. Column 4 = SUMX(‘Product’,’Product’[DealerPrice] * ‘Product’[ListPrice])

If you are newer to Power BI learning then following must-watch video: -

--

--

No responses yet