3 Replies Latest reply on Aug 18, 2014 10:44 AM by erolst

    Weight calculations in a relationship

    chrismoore68

      A while ago I needed help with a solution to calculate weight variances in Filemaker Pro 12. I have another problem if anyone could help. I need to get current weight, 3 months prior, 6 months prior, and 1 year prior for each patient to show up either through a portal or a report using fields "entry date", "weight", and "percentage variance". Is it possible? i have to keep into account some weight entries may be left blank in wich case the previous one should be used.

       

      Thanks,

        • 1. Re: Weight calculations in a relationship
          erolst

          chrismoore68 wrote:

          I need to get current weight, 3 months prior, 6 months prior, and 1 year prior for each patient to show up either through a portal or a report using fields "entry date",  "weight", and "percentage variance".

           

          How many weight entries are there per patient?

           

          What does “current”, “3 months ago” etc. mean in relationship to the date of the report creation / query? Does it mean “exactly today”, “exactly 3 months ago” etc. – or “the most recent one”, "3-6 months ago" etc.?

           

          And is your goal to just display the matching values, or use them in a calculation?

          • 2. Re: Weight calculations in a relationship
            chrismoore68

            Weights are monthly (unless hospitalized) so 12 entries annually.  Each month I need to show weight gain/loss and percentages for current month, 3 months prior, 6 months prior, 1 year prior.Calculation of Portal row data

            • 3. Re: Weight calculations in a relationship
              erolst

              Hi Chris,

               

              it's not that difficult to implement, except for this part:

               

              chrismoore68 wrote:

              i have to keep into account some weight entries may be left blank in wich case the previous one should be used.

               

              where you need to decide on your “business rules”, i.e. how to handle missing entries within a given group, and how far back to look to compensate.

               

              See the attached file helps you get going.