DAX Deep Dive 10: Why Your SUMX Total is Wrong – How CALCULATE Enables Context Transition
Many people memorize the sentence, "CALCULATE transforms a row into a filter," yet they find themselves helpless when faced with errors in practice. The cause of this problem is not simple. The core issue is not merely that "transition occurs," but rather when and within what scope that transition is actually applied. To understand this mechanism most intuitively, we will introduce two concepts: The Eyes (Row Context): The gaze that reads through data line by line (Iterative functions). The Hands (Filter Context): The power to reconstruct the environment based on the information read (CALCULATE). Today, through three comparative scenarios—Measures A, B, and C—we will perfectly master how results change dramatically when only the 'Eyes' are open versus when the 'Hands' move together, and how to restore our Totals to nor...