Forum Discussion
rtaylor
7 years agoHelper III
Difference in values for seeming same measures
Can anyone share any insight as why these dax measures have different results? I can't find any literature on why this would be the case. I've noticed the phenomena twice so far. First Measure se...
- 7 years ago
rtaylor wrote:Can anyone share any insight as why these dax measures have different results? I can't find any literature on why this would be the case. I've noticed the phenomena twice so far.The reason is that variables are calculated once within the scope where they are defined. So in your second measure set the "occu" variable will be calculated once for all dates in the current context, this makes the MAXX(SUMMARIZE(...)) call redundant as occu will have the same value for every row.
Whereas in the first measure set when you reference one measure within the summarize in the second measure the expression is re-evaluated within the context of the summarize.
Greg_Deckler
7 years agoCommunity Champion
I actually do not believe either is correct. It seems like what you really want is this:
MAXX ( SUMMARIZE ( 'Date', 'Date'[Date], "__occu",[Occupancy Residency Count_.]),[__occu])
For the 2nd one you would want:
MAXX ( SUMMARIZE ( 'Date', 'Date'[Date], "__occu",occu),[__occu])