Forum Discussion
Only Display Latest Sequence
- 2 years ago
jmetf150 You can use a Complex Selector for this. The Complex Selector - Microsoft Fabric Community
Probably something like:
Measure = VAR __PO = MAX('Table'[PO]) VAR __CurrentDate = MAX('Table'[Confirmation Date]) VAR __MaxDate = MAXX( FILTER( ALL('Table'), [PO] = __PO ), [Confirmation Date]) VAR __Result = IF( __CurrentDate = __MaxDate, 1, 0 ) RETURN __Result - 2 years ago
jmetf150 No, because they don't alphabetically sort correctly. So if you had AB, P2 and E1 and got the max, it would return P2. You could create a calculated column that assigned a number such as a SWITCH statement that assigned 1 to AB, 2 to P2, etc. and that should work in lieu of a date.
jmetf150 Then you wouldn't have anything to define "latest" so it wouldn't work unless you added like an Index column assuming that things are actually sorted correctly.
Greg_Deckler Can you use the confirmation sequence to define the latest? blank/null would always be first, and SN would always be last (per the sequence defined below)
The different confirmations are below in sequence:
blank or null = not confirmed yet
AB
P2
E1
E2
E3
E4
E5
SN
- Greg_Deckler2 years agoCommunity Champion
jmetf150 No, because they don't alphabetically sort correctly. So if you had AB, P2 and E1 and got the max, it would return P2. You could create a calculated column that assigned a number such as a SWITCH statement that assigned 1 to AB, 2 to P2, etc. and that should work in lieu of a date.