Show Data for the most recent full week
I thought this was going to be easy (and maybe it is).
I am working on creating a Pyramid usage dashboard. Part of that is looking at user logins. I have a Discover that shows the total number of logins per user each week.
What I am trying to do is by default have the Discover display the most recent full week. This is week 26 so I want the Discover to default to week 25.
Is this possible? Does anyone have any ideas on how to do this?
7 replies
-
Hi
Easiest way is to use dynamic lists.
Create a list of all the Year Weeks:
Then filter for the Last 2:
Then filter for the First 1:
Then use this list in your Discover:
Now, strictly speaking, this isn't the most recent complete week. For that you would have to check each week going backwards to find the first one with 7 date members associated with it. But I think this should give you what you want.
Hope that helps.
Ian
-
Thanks Ian!
How are you sorting the week numbers? Since it is alphanumeric the sorting is off.
-
The Week Year sort is defined in he model and gives the correct sequence, so no sorting is required:
Ian
-
BTW... Outside of the Pyramid Usage model shipped with the product, any access to the Repository tables are not supported. Thus there is the potential that should the repository schema change between releases, your model may fail.