AnsweredAssumed Answered

Calculating a value only for first occurrence of a field value

Question asked by rgriff on Mar 31, 2010
Latest reply on Apr 23, 2010 by rgriff

Title

Calculating a value only for first occurrence of a field value

Post

Greetings! I was a long-ago FileMaker Pro developer -- as in version 5, I think. I last did anything substantive in 8.5, so it's been a while. Now, however, I've got a need for a database to store a customer database for our products. We sell online, and pay a fee per transaction, plus a percentage of the revenue. So far so good...

 

The data I get from our online sales company just reflect gross revenue. Even worse, if a customer buys four products, that shows up as four rows in the downloaded file. Each row of a multi-unit sale will have the same internal transaction ID. So in Excel, it was relatively trivial to create a calculation that only creates a transaction cost when the transaction ID changes.

 

In FMPro, though, I'm uncertain as to how to do that. My recollection is that I somehow need to use a summary field, but that's about as far as I got. In essence, I need a calculation that is as follows:

 

If (first occurrence of TransactionID) then (calculate transaction cost) otherwise (leave blank)

 

All help appreciated;

-rob.

Outcomes