Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am trying to wirte an expression that does a count on the field [OwnerID] where the field [Date Termed] falls between the current_date and current_date -7 days. Ideally I would like if it just did a count on [ownerID] for the prior week.
maybe try this in loadscript:
Date(Date#(DATEFIELD, 'YYYY-MM-DD'), 'MM/DD/YYYY') as NEWDATENAME
and replace DATEFIELD and NEWDATENAME with your fields.
Maybe you want beginning of week for each date too, then do:
Date(Weekstart(Date#(DATEFIELD, 'YYYY-MM-DD')), 'MM/DD/YYYY') as NEWWEEKSTARTNAME
and replace DATEFIELD and NEWWEEKSTARTNAME with your fields.
Then in the expression, do:
=Count({<NEWWEEKSTARTNAME = {"<$(=weekstart(today())), >=$(=weekstart(today()-7))"}>}[OwnerID])