I have a list of tasks that must occur in a "moment", there are more than 15 moments in the task list.
Is there any expression that allows me to see only the tasks that are at time 2 if the tasks at time 1 are in "Completed" status? And the tasks that are at time 3 if the tasks of time 2 are in "Completed" status, etc...
This is the Slice expression I am currently using to filter the tasks by each user.
Solved! Go to Solution.
ChatGPT solved my problem, validating the number of tasks at "X Momento" Vs total tasks of "X Momento" in "Asignada" status.
Here is the code it generated for me:
IF(
[Momento] = 1,
[Estatus] = "Asignada",
AND(
[Momento] > 1,
[Momento] < 20,
[Estatus] = "Asignada",
COUNT(
SELECT(
Tareas[Estatus],
AND(
[Momento] = [_THISROW].[Momento] - 1,
[Estatus] = "En Progreso",
([Caso] = [_THISROW].[Caso])
)
)
) = COUNT(
SELECT(
Tareas[Estatus],
AND(
[Momento] = [_THISROW].[Momento] - 1,
([Caso] = [_THISROW].[Caso])
)
)
)
)
)
Thanks!
Not sure if I understand completely here. Assuming you have a [Time] column with values 1,2,3,etc. And you want to only see the lowest [Time] value records, until all of the previous level have been fully completed? If I've got it, you could do something like this:
[Time] = MIN( SELECT( Table[Time] , [Status] <> "Completed" ) )
Thanks Marc!
Yes, you understood me.
But, the tasks are related to a specific project and only "Time 2" tasks are shown when the status of "Time 1" tasks of ALL projects is "completed".
This is an example image, "Time 2 tasks" are only shown when all users have "Time 1" tasks in "completed" status.
Add more conditions to my example expression to include matching the to the project.
Marc, How can I add more conditions to the expression? The "MIN" function checks the context in the whole column and I can't add the project ID to filter.
Thanks Mark!
This is the Expression with the "Ands".
AND(
(IF(
USERSETTINGS("Rol")="Administrador",
[Estatus]="Asignada",
and([Estatus]="Asignada",
[Responsable]=USERSETTINGS(User)))),
([Momento]=MIN(SELECT(Tareas[Momento],AND(([Caso]=[Caso]),[Estatus]="Asignada"))
)
))
But the View, but the view does not show the "moment 2" tasks when the moment 1 tasks are in a status that is different from "Asignada".
Add in a thisrow dereference
ChatGPT solved my problem, validating the number of tasks at "X Momento" Vs total tasks of "X Momento" in "Asignada" status.
Here is the code it generated for me:
IF(
[Momento] = 1,
[Estatus] = "Asignada",
AND(
[Momento] > 1,
[Momento] < 20,
[Estatus] = "Asignada",
COUNT(
SELECT(
Tareas[Estatus],
AND(
[Momento] = [_THISROW].[Momento] - 1,
[Estatus] = "En Progreso",
([Caso] = [_THISROW].[Caso])
)
)
) = COUNT(
SELECT(
Tareas[Estatus],
AND(
[Momento] = [_THISROW].[Momento] - 1,
([Caso] = [_THISROW].[Caso])
)
)
)
)
)
Thanks!
User | Count |
---|---|
35 | |
31 | |
30 | |
19 | |
18 |