Help Grouping into buckets based off of Lowest task number that has not been completed
I am a Newb to Qlik Sense and have been working on this for a few days, and cannot figure out where I am going wrong.
I am Using a funnel chart to count the number of companies that would fall into each of the buckets (Prospection, Contracting, Onboarding, and Complete).
The data is a list of tasks that have a [Status] of 'To Do' or 'Done'. My goal here is to find the lowest [TaskNo.] where [Status]='To Do' and then Count for the [Bucket] it is currently in.
For example: When looking at the 16 tasks specific to a [Company], if tasks 2-5 are 'Done' and task 6 is 'To Do' then that count would go to contracting. If task 1 is the only task 'Done' and task 2-17 are 'To Do' then the count would go in Prospection.
below is the expression I have been attempting to use.