Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

How to reference columns in a summarised table

I have written the following DAX code for a measure   VAR ItemTable = SUMMARIZE(Merge1, Merge1[Item Code], "Occurences", DISTINCTCOUNT(Merge1[Order Id])) VAR Result = SUMX(ItemTable, ItemTable[O...
  • Anonymous's avatar
    Anonymous
    5 years ago

    The (my) problem was more to do with understanding how EVALUATE works. This worked just fine.


     DEFINE

        VAR ItemTable = SUMMARIZE(Merge1, Merge1[Item Code], "Occurences", DISTINCTCOUNT(Merge1[Order Id]))
        
    EVALUATE

        ROW("ResultTable", SUMX(ItemTable, [Occurences]))