Forum Discussion
Matt_Gol
3 years agoHelper I
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 need to have the first one based on the date/time column or sequence column.
Thanks
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
2 Replies
- Matt_GolHelper I
You are a legend Greg_Deckler , I was thinking too far hahaha
- Greg_DecklerCommunity Champion
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