Ralph Schwegler Posted August 4, 2014 Posted August 4, 2014 Hi! I've got a list with among other data a number. I want to save in a field the count of those numbers, for instance on today's run we've got two counts of 104, seven of 201, 13 of 220, and so on (somewhere like ten different values every day). I has to be saved every night for a history. It will run as nightly scripts on a FM Server 13. What is the best solution for this? Sort Data, count the occurrences and feed a repeated field is the one I have in mind. Is this old fashioned or the way to go? Thank you for your comments on this.
Ralph Schwegler Posted August 4, 2014 Author Posted August 4, 2014 there is the value which defines the "title" and the hits for that title, for instance hit for 104, followed by hit for 220, followed by hit for 104, hit for 201, and so on...
comment Posted August 4, 2014 Posted August 4, 2014 I am sorry, but you're not being clear. Is the given data organized in a table - as records and fields? If yes, what are the fields in this table? And how will you find the data that needs to be summarized every night? Is there a Date field?
Ralph Schwegler Posted August 4, 2014 Author Posted August 4, 2014 sorry for not being clear... yes, a table, with title (the number), a timestamp & some other info I discard for that need. In fact, all I need is the count of numbers in the found set.
comment Posted August 4, 2014 Posted August 4, 2014 Okay, then. First, I would suggest that your target table have the following fields: • Date • Value • Frequency I presume the purpose of this table is to allow some statistical overviews to be produced - which would make repeating fields a very poor choice. Now, as you have already surmised, your script needs to find the relevant source data, sort it by value (Title?) and then create a record in the target table for each sub-summary value. This is best achieved using a method called "Fast Summaries" (look it up).
Ralph Schwegler Posted August 4, 2014 Author Posted August 4, 2014 thank you - I'm not sure it's the best way to go as it should create a history - I will give it a try
comment Posted August 4, 2014 Posted August 4, 2014 (edited) I'm not sure it's the best way to go as it should create a history There are two questions here: 1. What is history (in this case)? 2. What's the best way to keep it? If we accept your description in the original post: the count of those numbers, for instance on today's run we've got two counts of 104, seven of 201, 13 of 220, and so on as the answer to the first question, then there can be little doubt that the three fields described in my post are the answer to the second one. -- Though of course we are speaking in generalities, since you haven't told us anything about the meaning of this data and the purpose of keeping it. Edited August 4, 2014 by comment
Ralph Schwegler Posted August 6, 2014 Author Posted August 6, 2014 There are two questions here: 1. What is history (in this case)? 2. What's the best way to keep it? If we accept your description in the original post: as the answer to the first question, then there can be little doubt that the three fields described in my post are the answer to the second one. -- Though of course we are speaking in generalities, since you haven't told us anything about the meaning of this data and the purpose of keeping it. Every week (title) there are occurrences of case numbers (hit). Those records might be deleted with the time, and we need to keep record of the situation at a given (past) date. That's why I plan to create a new table. Is my description clear, or should I be more concrete? Thank you for your advices.
comment Posted August 6, 2014 Posted August 6, 2014 Is my description clear, or should I be more concrete? I am not sure: you didn't say anything about "every week" until now. The way I understand your description now, you have a table recording every single instance of [something] and you want to keep - in another table - the history of summary values only for each day (or week?), for example: Log: 2014-08-05 201 2014-08-05 201 2014-08-05 104 2014-08-05 220 2014-08-05 201 2014-08-05 220 2014-08-05 104 2014-08-05 201 2014-08-06 220 2014-08-06 104 2014-08-06 201 2014-08-06 201 2014-08-06 201 History: 2014-08-05 201 3 2014-08-05 104 1 2014-08-05 220 2 2014-08-06 104 2 2014-08-06 201 4 2014-08-06 220 1 That's a fairly common requirement, and implementing it is merely a matter of summarizing the daily log values and creating a history record for each sub-summary.
Recommended Posts
This topic is 3760 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now