Forum Discussion

VendettaBob's avatar
VendettaBob
Helper II
4 years ago
Solved

SummarizeColumns() and AddMissingItems()

Hi,   I have the following code:     _CumulativeFrequencyRateThisYear = var _table = SUMMARIZECOLUMNS( 'EventYearMonth'[CalendarMonthId], FILTER( KEEPFILTERS(VALUES('EventYear...
  • AlexisOlson's avatar
    4 years ago

    The reason for this is that "SUMMARIZECOLUMNS cannot be used in a context transition. You could use it in a filter, but you cannot invoke SUMMARIZECOLUMNS in a measure because the measure is often called in a context transition." (From Marco's reply to a comment on this article.)

     

    SUMMARIZECOLUMNS is great for writing DAX queries but if you're writing a measure, then you almost always need to use SUMMARIZE instead.