Forum Discussion
Bswuste
2 years agoFrequent Visitor
MIN MAX question
Hi all, I have a question about MIN/MAX function. In the incident table, there is a CreationDate and a ClosureDate and I have a Date table. I want to know how many incidents are open at the begin...
- 2 years ago
Found it.
I needed to remove the equal to sign. Now the numbers are correct.
Msr_IncidentOpenatBeginningOfTimespan =
VAR CurrentDate = MIN('Date'[Date])
RETURN
CALCULATE(
COUNTROWS(Incidents),
'Date'[Date]<= CurrentDate,
Incidents[closureDate] > CurrentDate
||
ISBLANK(Incidents[closureDate]),
USERELATIONSHIP(Incidents[creationDate], 'Date'[Date]))
Bswuste
2 years agoFrequent Visitor
Found it.
I needed to remove the equal to sign. Now the numbers are correct.
Msr_IncidentOpenatBeginningOfTimespan =
VAR CurrentDate = MIN('Date'[Date])
RETURN
CALCULATE(
COUNTROWS(Incidents),
'Date'[Date]<= CurrentDate,
Incidents[closureDate] > CurrentDate
||
ISBLANK(Incidents[closureDate]),
USERELATIONSHIP(Incidents[creationDate], 'Date'[Date]))