Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all
I have the following fields:
Date
Activity_id
I also have a table chart with the following expression: count(Activities_id).
I want to count (Activities_id) using set analysis, so that I'll count all the activities which were performed 7 days ago till today.
I'm not sure how I can do that... I'm using the following expression in order to count last week activities:
=count
(DISTINCT
{$<[YearWeek_Num] = {$(=MAX([YearWeek_Num])-1)}>}
[Activities_id]
)
can someone please advise?
thanks!
Hi Michal,
Please try below expression.
=
count({<Date={">=$(=date(today()-7))<=$(=date(today()))"}>} Activity_id)
I should do:
count
(DISTINCT
{$<[YearWeek_Num] = {$(=(year(Today()-7)*100+week(today()-7)))}>}
[Activities_id]
)
Assuming that the field names are Date and Activity_id, this will work:
count({<Date={">=date(today()-7)<=date(today()"}>} distinct Activity_id)
count({<Date={">=date(today()-7)<=date(today())"}>} distinct Activity_id)
U missed a Bracket
thanks
Hi! thank you for your help.
for some reason the result is '0' although I have activities in the last 7 days
please check the attached example...
thanks
Hi Michal,
Please try below expression.
=
count({<Date={">=$(=date(today()-7))<=$(=date(today()))"}>} Activity_id)
OK, here is a more reliable way:
=count({<Date={"$(='>='&date(today()-7)&'<='&date(today()))"}>} distinct Activity_id)
Hi,
Michal
Try this
=count({<Date={"=date(today()-7)"}>} distinct Activity_id)
Hi
Try like this
count({<Date={">=$(=date(today()-7))<=$(=date(today()))"}>} distinct Activity_id)