RE: Help - Rollup based on dates
Hi Partner,
Creating a rollup field is correct way, but set filter in view is no able to filter the count of opportunities based on date.
For example, you created a view based on account entity and add count field as a column in it, but you should noticed that the roll up field will show all the opportunity counts for each account if you don't set filter conditions in roll up field. Setting date filter in view won't work.
So you need to set filter conditions based on date in roll up field properties directly.
For example, you want show weekly counts of opportunities for each account, you could refer to the following steps.
1.Create two date&time field in account named startDate and endDate, and their format must be "Date and Time" so that they could be used in roll up field condition.
2.Create a schedule Power Automate run everyday. And then update the account entity, set the startDate to DateAdd(Now(),-7)) and endDate to Now();
3.Go to your roll up field property, and set up the filter condition, set the created on is less than endDate and created on is larger than startDate.
Then the roll up field will only show the count of opportunities created in each week for each account.
Regards,
Leo