Forum Discussion
jitpbi
Post Patron
5 years agoif with multiple conditions
Hi, the below is the sample of my data, where table name is "Table": Device Name Status DateTime A Healthy 10/15/2020 16:05:10 PM B Healthy 10/15/2020 14:05:10 PM A Faulty ...
HotChilli
Community Champion
5 years agoCreate a measure:
MeasureD = VAR maxDate = MAX(TableQ[DateTime])
VAR badTab = FILTER(TableQ, TableQ[Status] = "Faulty" && TableQ[DateTime] = maxDate)
RETURN
IF (COUNTROWS(badTab) > 0, "faulty", "Not")
Put it on a table with Device
For best performance, you should use a separate date and time table but this might work as it is.