

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
KPI - show count for last 30 days
Hi,
Simple thing.
I have a KPI from charts and just want to show the total count of 'Date Created' for the last 30 days and then another the count on the previous 30 days.
I have this at the moment:
Count({<[Date Created]*={'11/02/2020'}>}[Date Created]) But this only shows for the one date.
Any direction on this gratefully accepted.
Thanks
- « Previous Replies
-
- 1
- 2
- Next Replies »
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try this
Count({<[Date Created] *= {">=$(=Date(Today(1) - 30, 'DD/MM/YYYY'))<=$(=Date(Today(1), 'DD/MM/YYYY'))"}>} [Date Created])
I missed closing parenthesis when I posted this expression above. You can see the evaluation of your set analysis right underneath

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can try this for last 30 days from today
Count({<[Date Created] *= {">=$(=Date(Today(1) - 30, 'DD/MM/YYYY')<=$(=Date(Today(1), 'DD/MM/YYYY')"}>} [Date Created])


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks very much...does not seem to work? thinking something in the syntax?
I did use your script and changed it to UK date format .
Count({<[Date Created] *= {">=$(=Date(Today(1) - 30, 'DD/MM/YYYY')<=$(=Date(Today(1), 'DD/MM/YYYY')"}>} [Date Created])

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Changing it to UK date format did not help?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi,
you can try this
Count({<[Date Created]*={'>=$(=Date(Today()-30))<=$(=Date(Today()))'}>}[Date Created])
Thanks,
Nitin.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you - that works but gives me the count of only 30 days ago for that day - I need the count for all up to the last 30 days.
Big thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
can you please check again
Count({<[Date Created]*={'>=$(=Date(Today()-30))<=$(=Date(Today()))'}>}[Date Created])


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thankyou - this produces a zero 0? Cannot quite see the problem 😞

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
can you give us some sample data file


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is a working sample of the data:
Thanks
Unqualify *;
[Date Table Created]:
LOAD * INLINE
[
"Date Created"
15/02/2020
16/02/2020
17/02/2020
18/02/2020
19/02/2020
20/02/2020
21/02/2020
22/02/2020
23/02/2020
24/02/2020
25/02/2020
26/02/2020
27/02/2020
28/02/2020
29/02/2020
01/03/2020
01/03/2020
01/03/2020
01/03/2020
01/03/2020
01/03/2020
01/03/2020
08/03/2020
09/03/2020
10/03/2020
11/03/2020
12/03/2020
13/03/2020
13/03/2020
13/03/2020
13/03/2020
13/03/2020
13/03/2020
13/03/2020
14/03/2020
15/03/2020
16/03/2020
17/03/2020
18/03/2020
19/03/2020
20/03/2020
20/03/2020
21/03/2020
22/03/2020
23/03/2020
24/03/2020
25/03/2020
26/03/2020
27/03/2020
28/03/2020
29/03/2020
30/03/2020
31/03/2020
](delimiter is ',');

- « Previous Replies
-
- 1
- 2
- Next Replies »