# number of completed actions

HCF
New Member

With several records completed per day, I should like to see which number in a row the completed record is. Each record has a “Complete” status and a “TimeCompleted” DateTime.
How can I construct an expression to see which number in a row each record is for the day it was completed?

0 4 121
4 REPLIES 4

What do you mean with “…which number…”? Do you want to count the total number of records with “Complete” status?

@LeventK - during a day I will complete several actions. The first action is #1, the next #2 and #3 and so on. Next days we start with #1 again.

Perhaps:

MAX( 
  SELECT( table[number] , 
    AND( 
      [Complete] , 
      DATE([TimeCompleted]) = TODAY() 
      ) 
    )
  ) 
+ 1

This expression should set the value of the [number] column when a record is marked as completed (perhaps as an Initial value with an appropriate resetOnEdit expression, or an Action).

This assumes that all records are marked as completed on the day that they are completed.

This also assigns the values in the order in which they are marked completed in the app, disregarding if any of the time completed values aren’t in temporal order (that would be a lot more complicated/expensive).

I would go about creating a slice to hold this subset of data;

“Todays_Completed_Items” or something

and(
  [Status] = "Complete',
  DATE([Completion_Timestamp]) = TODAY()
)

Then, when the record is marked as complete:

  • I’d run a COUNT() over that slice and use that to set the [Completion_Count] column

COUNT(Todays_Completed_Items[ItemID]) + 1

Top Labels in this Space