August 28, 201114 yr I have a table of transactions in which there are hundreds for each day that are timestamped. I want to create a "dashboard" that will show the number of transactions for the current day, previous day, current week, previous week, month etc. The only way I can think to do this is to create a separate relationship for each date period I want to show. Basically, have a Today, Yesterday, ThisWeekStart, ThisWeekEnd, LastWeekStart, LastWeekEnd, etc. fields in the dashboard layout, then build SEVERAL relationships to the transaction table where the relationship is based on the dates then have calculation fields that "count(transactions::field)." There has to be a cleaner way of accomplishing this, without all the relationships but I can't seem to get my head around it. Any help is greatly appreciated.
August 28, 201114 yr Perhaps you could reduce the number of relationships by filtered portals - for example, have a relationship for this week, and use filtered portals to extract today's and yesterday's records out of the related set. Not sure how fast this is going to be, though, with hundreds of records per day. The "cleaner" method would be to summarize the transactions in their own table.
Create an account or sign in to comment