I have a hosted feature layer that updates every time there is data submitted from a field worker with the date. I have created a view layer and a Web App Builder's Weekly report. I would like to build an Arcade expression based on ISOWeek or ISOWeekday to return the count of the features for each week. The purpose is to refresh the feature counts every week on Monday. I referenced the following link: ArcGIS Online Community Post and have created a sample code:
if ( ISOWeek($feature.yourDateField) == ISOWeek(Now()) ) {
return 'Count';
}
However, it seems like it's not returning the feature count for each week. It seems like I'm misunderstanding something, and I need help.
Unfortunately, the widget (Weekly Counts) on Web App Builder is only showing reports for last 7 days. Which means, if the end user sees the report on Thursday, the number of feature layer that the user receives includes the number from Thursday through Friday.
I would like to see the number of the feature count that is refreshing every Monday (Showing number of features collected based on Date field *Contacted Date) starting from Monday and ending on Sunday - every week.