Forum Discussion
aflintdepm
Helper III
2 years agoNext Visit Type by Visit Date
I have a table of client visits and visit dates (all future). There are multiple visit types that could be scheduled, but I would like to report what the next visit type is, not the when. Here i...
- 2 years ago
Hi aflintdepm
Would a measure like this help?
Next Visit Type = VAR _NextDate = CALCULATE( MIN( 'Table'[Visit Date] ), 'Table'[Visit Date] > TODAY() ) VAR _NextType = CALCULATE( MAX( 'Table'[Visit Type] ), 'Table'[Visit Date] = _NextDate ) RETURN _NextType
gmsamborn
Super User
2 years agoHi aflintdepm
Would a measure like this help?
Next Visit Type =
VAR _NextDate =
CALCULATE(
MIN( 'Table'[Visit Date] ),
'Table'[Visit Date] > TODAY()
)
VAR _NextType =
CALCULATE(
MAX( 'Table'[Visit Type] ),
'Table'[Visit Date] = _NextDate
)
RETURN
_NextType