Feb 10 2023 08:36 AM
Hello,
I'm trying to sort an array based on a helper column inside a table.
=FILTER(SORTBY(countTBL[Name],countTBL[Type],1),(SORTBY(countTBL[Type],countTBL[Type],1)=1)*(countTBL[Shift]="Morning"))
This is my messed up formula.
I need to filter names by countTBL[Shift] and then sort countTBL[Name] by countTBL[Type] in ascending order but I haven't been successful.
I'd greatly appreciate your assistance.
Feb 11 2023 02:35 AM
@kh3ldar Can't be sure without seeing the underlying data, but I think the formula below does what you have in mind.
=SORT(FILTER(countTBL[Name],(countTBL[Type]=1)*(countTBL[Shift]="Morning")))
It filters the Name column where Type = 1 and Shift = "Morning". Then it sorts the array in ascending order.