Forum Discussion

Matt_Gol's avatar
Matt_Gol
Helper I
3 years ago
Solved

Finding the first value in column based on date or sequence

Hi everyone I have a challenge to find the first order number in a table when I apply a date slicer. The FIRSTNONBLANK() gets me back the first one by sorting them but I don't want to sort them, I ...
  • Greg_Deckler's avatar
    3 years ago

    Matt_Gol Try this pattern:

    Measure = 
      VAR __Date = MIN('Table'[Date])
      VAR __Table = FILTER(ALLSELECTED('Table'),[Date] = __Date)
      VAR __Result = MINX(__Table, [Order Number])
    RETURN
      __Result