Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Calculated column, measures and evaluation context

Hi,   Wanted help something very basis related to evaluation contexts.   To illustrate, I have 3 tables as hown below:   Table 1: Base Table 2: Purchase Table 3: Sales The ...
  • Dangar332's avatar
    Dangar332
    2 years ago

    hi, Anonymous 

    in check_2 you gave only row context(because of calculated column )  you miss filter context 

    so when you wrap your code in calculate () it give filter context beacuse calculate() is filter modifier.

    context transition happen only and only when both   1.row context and   2.filter context present in code.

     

    that's why in Check_2 you get 165 becuase of missing of filter context
    when you wrap your code in CALCULATE() it give row context.


    and it use expanded table that's why it evaluate even direct relationship is not present

     

    in Check_1 you use measure
    and  in measure Calculate() present Internally that's why don't need to use Calculate().