web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / PA flow to track lengt...
Power Automate
Unanswered

PA flow to track length in a project phase based on a field changes

(0) ShareShare
ReportReport
Posted on by 15

Hi all,

i am looking for help/support  to solve my requirement and it is:

To be able to track a length in project phase which follows with following stages:

    • Preparation
    • Specification
    • Implementation
    • Closure

Where i would like to track the duration of how many days the project occurred in a particular stage. My custom list contains lots of fields and one of them is called „Project phase“, containing drop down list of the above mentioned stages. I am interested in date when i entered the particular stage and when exited, this is based only on the filed “ Project Phase” change with no additional fields containing date. This would have to be taken out of the history data/versions?

 

Is there any chance to track the length and record the duration time in other list which will contain e.g.:

Project name ‖ project phase ‖ duration in days -  where for each project will be there several lines or anyone have better solution?

Categories:
I have the same question (0)
  • David_MA Profile Picture
    14,554 Super User 2026 Season 1 on at

    If you don't want to add more fields to your existing list, I would suggest the following:

    1. Create one flow that runs when the item is created, which then creates the initial item in your secondary list for tracking the dates of the stages. Be sure to add an integer column to populate it with the ID of the original item to ensure the ID of the two list are not out of sync.
    2. Create a second flow that runs only when the item is modified. You will then use the get versions action and check of the stage value has changed.
      1. If it has, you can use a switch to direct the flow to the actions for that stage to set a corresponding date field to the modified date of the original list item.
      2. If the stage wasn't modified, the flow ends.
      3. You can use ticks to calculate the number of days between the two dates in the stages. This post will provide guidance: How to find the number of days between two dates u... - Power Platform Community (microsoft.com)
      4. An easier method if you only need to see the days in the SharePoint view would be to use JSON list formatting to calculate then number of dates between two stages. You would apply the following to the date field and update $EndDate with the other date field. For example, to find the days between Preparation and Specification, you would add the code to the Specification date field and set $EndDate to the internal name of the Preparation date field.
    {
     "$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
     "elmType": "div",
     "txtContent": "=if(Number(@currentField) == 0, 'N/A', '@currentField.displayValue' + ' (' + floor((Number(@currentField) - Number([$EndDate])) / (86400000)) + ' days)')",
     "style": {
     "border": "none",
     "background-color": "transparent",
     "cursor": "pointer"
     }
    }

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 921

#2
Valantis Profile Picture

Valantis 801

#3
Haque Profile Picture

Haque 588

Last 30 days Overall leaderboard