Hi @javierz ,
Could you share more details on your scenario?
I guess that you have a Choice column for the Status, and a date column for the Modified date time.
Do you want to calculate the days between the modified date of two status? Besides, it looks like the modified date time column will be updated whenever an item is modified.
If so, please check if flow likes below will be a reference for you.
After the trigger “When an item is created or modified”, get item, then use a Compose to get the DueDate.
Then update item action to update the DueDate with the following function:
Adddays(utcnow(),7,’yyyy-MM-dd’)
Then Get item 2, and Compose 2 to get the current DueDate.
Add Compose 3 with the following function to get days between two dates.
div(sub(ticks(outputs('Compose_2')),ticks(outputs('Compose'))),864000000000)
Note: When you are using the trigger When an item is created or modified and Update item on the same list within a flow, an infinite loop will be caused.

Best regards,
Mabel