Forum Discussion
Robert4049
5 years agoFrequent Visitor
RankX Weird Behavior With Filter
Okay talked about confused, I went ahead and removed blank arrive date times but the still show up when I filter and I can't figure this out. Any hints? MedicalUnitFirstDue =
VAR CurrentExpo...
sevenhills
5 years agoSuper User
&& Apparatus[Arrival Date/Time] <> BLANK ()Try this ...
sevenhills
5 years agoSuper User
I will ask you to try one more attempt, (as it is tough without sample data and expected output data, for someone to provide DAX)
Let us see this is what you need as first due date time for every run number. Once we get this one resolved, then you can build the rank similarly.
Below DAX, gives the first Arrival Date time for the Run number.
I used your filter of type id, and non blank arrival date time rows
MedicalUnitFirstDue =
VAR CurrentExposureID = Apparatus[Run Number]
VAR EngineTypeID = {"11", "12", "76"}
Var _c = CALCULATE(
Min(Apparatus[Arrival Date/Time]),
filter(
allexcept(Apparatus, Apparatus[Run Number], Apparatus[Apparatus Type ID], Apparatus[Arrival Date/Time]),
Apparatus[Run Number] = CurrentExposureID
&& Apparatus[Arrival Date/Time] <> BLANK()
&& Apparatus[Apparatus Type ID] IN EngineTypeID
)
)
RETURN # _c
IF (NOT IsBlank(_c), _c, BLANK ())
... not the full solution with Rankx, but trying to see the min date is working right.