Forum Discussion
Anzil375
May 15, 2021Copper Contributor
Sharepoint Online list calculated column with todays date not updating automatically
I have a calculated column in SharePoint online list for calculating the number of days took to complete a task. The calculation is like todays date -task assigned date it gives the correct result when manually updating the column but its not automatically updating daily. please advice
Anzil375 you would need to use a flow in Power Automate to loop through the list and do the calculations on each item. The trigger would be a recurrence schedule trigger. But it couldn't update a calculated column so you'd need to make the column for the number of days a number column.
Rob
Los Gallardos
Microsoft Power Automate Community Super User
Anzil375 This is a default behavior in SharePoint.
Calculated column values will be calculated/updated only when:
- A new item is created
- An existing item is updated
- Calculated column formula is updated
If you want to update the column value daily, you can create a scheduled flow as mentioned by RobElliott
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
- EA17123Copper Contributor
Hi all, hi ganeshsanap ,
I am facing a situation where my calculated column is using the field ID (unique number of the item in my list).
For safe of clarity and simplicity :
- I created a column named UID, as calculated column
- below is the (very) simplified formula I am using, in order to express the issue
=ID
The behaviour is the following :
- when the formula is modified, the modification are populated to all items
- when an Item is created or modified, the result is '0'
Could you please advise how I could reuse the ID and make sure everytime an item is created or modified, the formula is properly executed ?
Thanks in advance
EA
EA17123 Unfortunately, this is not possible using calculated column.
You have to customize your list form using Power apps to update UID column with the ID of list item after submit form function.
OR you can use simple power automate flow which will run on item creation in list and update UID column with the ID of list item using "Update item" action.
Please consider giving a Like if my post helped you in any way.
- RobElliottSilver Contributor
Anzil375 you would need to use a flow in Power Automate to loop through the list and do the calculations on each item. The trigger would be a recurrence schedule trigger. But it couldn't update a calculated column so you'd need to make the column for the number of days a number column.
Rob
Los Gallardos
Microsoft Power Automate Community Super User- nickchoyCopper Contributor
Hi RobElliott
Thanks - I am setting up a flow per your suggestion. I only have 11 items in there at the moment but it could grow significantly over time. How do I set the update to "all" (e.g. *)? I'm trying to get this to update daily (and to re-calculate all items on a daily basis).
Thanks in advance
- RobElliottSilver Contributor
nickchoy you can't use the update item as your first action after the trigger as the flow has no idea what item(s) you are trying to update. You would need to use a get items action, preferbly with a filter query to limit the results that are returned. Then based on that inside an apply to each you would update the item.
Rob
Los Gallardos
Microsoft Power Automate Community Super User
- waldek
Microsoft
This is by design. Calculated columns are computed only when editing the item.