3 Replies Latest reply on Aug 29, 2013 12:44 PM by philmodjunk

    Gain or Loss on Stock

    vadleft@gmail.com

      Title

      Gain or Loss on Stock

      Post

           I have a record for each stock and the amount I paid for it and the date of purchase.

           Another record is generated when the stock is sold.  Would like to have a formula to find how much money I lost or made on the transaction.

           My problem has been that these records are downloaded from the broker and they come separately  . . . so that is why I get two records.  Would like to combine the buy and sell in one record automatically.  

           If that can not be done . . . then one record has to be subtracted from the other record. 

           Would be grateful for any help.

           Ron

        • 1. Re: Gain or Loss on Stock
          philmodjunk

               You've posted to the FM GO portion of this forum. Does that mean that you are doing this on an iOS device?

               Assuming that your imported data includes a unique identifier, you can use that field in a find or relationship to access only records for that stock and the resulting set of records can be sorted by a transaction date to put them in chronological order. From there, the GetNthRecord function can be set up to access the value from the preceding record so that you can compute the difference. But this works best for small numbers of records in your found set or portal--especially if you are using FileMaker Go. On the other hand a self join relationship matching by Stock Symbol and sorted by Date could be constructed so that you can use the relationship to access the values in the preceding transaction record for that stock.

          • 2. Re: Gain or Loss on Stock
            vadleft@gmail.com

                 Thank you for the help.  Sounds like it will work for me.  Will do it later today.

                 I am using FileMaker Pro 12 on a Mac.  I do not have anything special other then the MAC.  Not sure what forum I should have posted to.

                 Thank you very much for your help.

                 Ron

            • 3. Re: Gain or Loss on Stock
              philmodjunk

                   If you look at the top of this screen, you will see a number of "file tabs" each for a specific area of the forum. Report an Issue is for filing reports of possible bugs in the software. FM Pro Forum is for getting help in how to use FileMaker Pro, and so forth...