Forum Discussion
janislv
Helper I
4 years agoMAXX - can't get off filter
Ok, maybe I'm dumb, but what could be wrong with this measure? I'm trying to get the max value and ignore the time filter. Max difference = VAR table_x = ADDCOLUMNS ( 'Hourly calendar', "inpu...
- 4 years ago
Once you define a variable, it's fixed and will not be modified by CALCULATE adjusting filter context.
See if this works better:
Max difference = VAR table_x = ADDCOLUMNS ( ALL ( 'Hourly calendar' ), "input", [Input measure], "output", [Output measure] ) VAR max_difference = MAXX ( table_x, [input] - [output] ) RETURN max_difference
AlexisOlson
Super User
4 years agoOnce you define a variable, it's fixed and will not be modified by CALCULATE adjusting filter context.
See if this works better:
Max difference =
VAR table_x =
ADDCOLUMNS (
ALL ( 'Hourly calendar' ),
"input", [Input measure],
"output", [Output measure]
)
VAR max_difference = MAXX ( table_x, [input] - [output] )
RETURN
max_difference