Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Which DAX functions are correct?

Hi, all together!   I am referring to Question #44 which you can find here   I have a bunch of questions to this exercise!   I think the solution should be FILTER AND ALL   but have some p...
  • Greg_Deckler's avatar
    Greg_Deckler
    3 years ago

    Anonymous Well, no sane human being would construct that measure that way. All you need to do is MAXX(FilterSegment,[Transaction Size]). You have to read up on CALCULATE extremely closely to understand why this works: CALCULATE – DAX Guide. Some CALCULATE only DAX try hard worked overtime to get CALCULATE into that formula. It's utter nonsense. But, because CALCULATE evaluates the 'Transaction Size'[Transaction Size] within the context of FilterSegment, which is a single row table, then the DISTINCT brings back a single row table of the [Transaction Size] that happens to correspond to the context of the single row table in FilterSegment, which is whatever transaction size the sales happen to fall into. It's black box, stupidly complicated nonsense and doesn't have to be nearly that difficult or obfuscated. MSHGQM - Don't Use CALCULATE! - YouTube