Get slice to display lowest results

Hi Appsheet Boffins,

Struggling with a slice expression iโ€™m hoping someone can help me with.

I have 2 tables โ€œProjectsโ€ and โ€œNext Actionsโ€ now a Project can have many Next Actions. I have created a Column in the โ€œNext Actionsโ€ table called Project Order every time a Next Action is created it finds the highest value of the last Next Action and increases it by โ€œ1โ€

Please see table image:

Iโ€™m currently sorting my slice by [Status] = โ€œIncompleteโ€ but I also need to get the next action for each project (E.g the action with the lowest โ€œProject Orderโ€ number) Also I want to show rows where the Project order = 0.

So the Rows numbers that should return are: 3,6 and 7.

Hope this makes sense, more images / information can be provided.

Thanks in advance.
Dave

0 2 91
2 REPLIES 2

AND(
  [status] = "Incomplete" ,
  OR(
    [project order] = 0 ,
    [project order] = MIN(SELECT( Next Actions[Project Order] , [project id] = [_THISROW].[project id] ))
  )
)

This almost works but doesnt return all the required rows

Top Labels in this Space