
684 P.2d 314 (1984)
106 Idaho 912
Elwood WING and Naomi Wing, husband and wife, Plaintiffs, Respondents and Cross-Appellants,
v.
Jay HULET and Gertrude Hulet, husband and wife, Defendants, Appellants and Cross-Respondents.
No. 14599.
Court of Appeals of Idaho.
May 31, 1984.
*315 Philip A. Peterson (White, Ahrens & Peterson, P.A.) Nampa, for defendants, appellants and cross-respondents.
G. Lance Salladay (Risch, Goss, Insinger & Salladay) Boise, for plaintiffs, respondents and cross-appellants.
BURNETT, Judge.
This appeal arises from a dispute between an agricultural landowner (Hulet) and a lessee (Wing) over various costs and losses connected with farm operations on the leased property. The lessee claimed damages for the owner's alleged interference with pasturage rights and failure to furnish water for a sugar beet crop at a critical time during the cultivation season. The landowner counterclaimed to recover certain crop production expenses. Because of this dispute, the landowner refused to join the lessee-grower in negotiating jointly payable checks issued by a purchaser of the sugar beets. After a jury trial, the district court awarded the lessee damages for the landowner's refusal to endorse the joint checks. However, the court determined that neither the landowner nor the lessee was entitled to recover anything from the other for costs and losses related to farm operations.
Both parties have appealed. For reasons explained below, we reverse the judgment relating to the lessee's claim of damages for the owner's refusal to endorse the joint checks. We affirm that part of the judgment denying recovery on the landowner's counterclaim. We vacate the remaining part of the judgment, denying the lessee's claim for crop loss.
In Part I of our opinion, we consider whether the trial court erred by allowing the lessee to claim damages relating to the joint checks when another claim relating to those checks already had been adjudicated by a different court. We analyze this issue *316 under the doctrine of claim preclusion. In Part II we address issues relating to the farm operation claims. We examine the landowner's assertion that the district court improperly allowed the lessee to prove an unpleaded offset against crop production expenses, for which the owner sought reimbursement under the lease. We also review the lessee's contentions that the court erred by withdrawing the issue of crop loss from the jury, and by failing to award the lessee attorney fees at trial. Our disposition of the issues treated in Parts I and II makes it unnecessary to discuss other questions raised by the parties on appeal.

I
We first inquire whether the landowner's liability for refusal to endorse joint checks should have been adjudicated in the present case. A proper analysis of this issue requires us to examine the relationship between this lawsuit and a companion case on appeal.

A
As noted above, the instant suit began as a controversy between the landowner and the lessee concerning various costs and losses connected with farming operations. This controversy led to further disagreement between the parties concerning their respective entitlements to proceeds from the sale of sugar beets grown on the leased property. When the sugar beet purchaser issued joint checks for the crop, the landowner refused to endorse the checks. The lessee then filed a separate lawsuit against the crop purchaser in Ada County, seeking a judgment compelling the purchaser to pay the lessee directly for his share of the crop. The landowner, believing that he was entitled to direct payment of his share by the crop purchaser, and also believing that the lessee was asserting an entitlement to an excessive share, moved to intervene as a defendant in the Ada County case. The lessee did not object to such intervention, and the motion was granted.
Having established his status as a litigant in the Ada County case, the landowner requested the Ada County court to determine the shares to which he and the lessee were entitled vis-a-vis each other. Such a determination would have required resolution of the claims concerning costs and losses of farm operations, already pending in Owyhee County. The lessee successfully resisted broadening the Ada County case to include those claims, urging that they were better left for resolution by the Owyhee County court.
However, the lessee emphatically urged the Ada County court to determine that the landowner wrongfully had refused to endorse the joint checks issued by the crop purchaser. This claim of wrongful conduct necessarily was embraced by the lessee's contention that he was entitled to separate payment direct from the crop purchaser. The claim also constituted the basis of the Ada County court's decision on whether to grant the lessee attorney fees against the landowner under I.C. § 12-121. The Ada County court ultimately granted summary judgment, directing disbursement of the crop sale proceeds as requested by the lessee; and the court awarded attorney fees under the statute. On appeal, in a decision issued concurrently with our opinion in the instant case, we have affirmed the summary judgment but have reversed the award of attorney fees. See Wing v. Amalgamated Sugar Co. and Hulet, 105 Idaho 905, 684 P.2d 307 (Ct.App. 1984).
Having obtained the desired determination that the landowner had acted wrongfully, the lessee sought no further relief in Ada County. Rather, he then moved to amend his complaint in Owyhee County by adding a claim for damages arising from the landowner's same wrongful refusal to sign the joint checks. The lessee sought compensatory damages in the form of lost interest on the crop proceeds, and punitive damages for the landowner's allegedly oppressive conduct. The landowner objected to the lessee's proposed amendment, but the objection was overruled. During trial, the Owyhee County court further ruled that the landowner's liability for refusal to *317 sign the joint checks had been established conclusively in the Ada County case. The Owyhee County jury was instructed that the landowner was liable as a matter of law and that it remained only for the jury to determine damages.
The landowner contends on appeal that the Owyhee County court erred in allowing the lessee, by amendment of his complaint, to seek damages in this case for the same conduct which was the focus of the lessee's suit in Ada County. We now turn to that question.

B
The issue is one of res judicata. As we recently explained in Aldape v. Akins, 105 Idaho 254, 668 P.2d 130 (Ct.App. 1983), res judicata has two components  claim preclusion and issue preclusion. Claim preclusion treats a judgment, once rendered, as the full measure of relief to be accorded between the same parties on the same claim. In general, issue preclusion bars the relitigation of issues actually adjudicated, and essential to the judgment, in prior litigation between the same parties. In the instant appeal, both of these components are implicated by the relationship between the Ada County case and the Owyhee County case.
The Owyhee County court, in ruling that the wrongfulness of the landowner's conduct had been established conclusively in the Ada County case, applied the doctrine of issue preclusion. The Owyhee County court treated the issue as having been adjudicated, and essential to the judgment, in the Ada County case; and the landowner was barred in the Owyhee County case from controverting the wrongfulness of his conduct. For the purpose of discussion, we assume that the court's ruling on issue preclusion was correct. However, the doctrine of issue preclusion could not have been applied if the Owyhee County court had not earlier allowed the lessee's complaint to be amended. Therefore, the question whether the court acted correctly in permitting the amendment turns upon the doctrine of claim preclusion.
Claim preclusion has two elements. The first, applied to judgment for a defendant, bars the plaintiff from bringing another action on the same claim. RESTATEMENT (SECOND) OF JUDGMENTS (1982) § 19 (herein cited as the Second Restatement). This form of claim preclusion was illustrated by our decision in Aldape. The second element, applied to judgment for a plaintiff, is a general rule of merger. This rule is set forth at § 18 of the Second Restatement:
When a valid and final personal judgment is rendered in favor of the plaintiff ... [t]he plaintiff cannot thereafter maintain an action on the original claim or any part thereof, although he may be able to maintain an action upon the judgment.
Comment a to this section states:
When the plaintiff recovers a valid and final personal judgment, his original claim is extinguished and rights upon the judgment are substituted for it. The plaintiff's original claim is said to be "merged" in the judgment.
Section 24 of the Second Restatement explains the doctrine of claim preclusion by amplifying the concept of a "claim":
(1) When a valid and final judgment rendered in an action extinguishes the plaintiff's claim pursuant to the [rule of merger], the claim extinguished includes all rights of the plaintiff to remedies against the defendant with respect to all or any part of the transaction, or series of connected transactions, out of which the action arose.
(2) What factual grouping constitutes a "transaction", and what groupings constitute a "series", are to be determined pragmatically, giving weight to such considerations as whether the facts are related in time, space, origin, or motivation, whether they form a convenient trial unit, and whether their treatment as a unit conforms to the parties' expectations or business understanding or usage.
A factual grouping constitutes a "transaction"  and therefore a "claim"  regardless *318 of whether the plaintiff, in separate lawsuits, has asserted different types of harm or has sought different forms of relief. Comment a to § 24 states:
The present trend is to see claim in factual terms and to make it coterminus with the transaction regardless of the number of substantive theories, or variant forms of relief flowing from those theories, that may be available to the plaintiff; regardless of the number of primary rights that may have been invaded; and regardless of the variations in the evidence needed to support the theories or rights. The transaction is the basis of the litigative unit or entity which may not be split.
Thus, the rule of merger articulated in § 18 of the Second Restatement applies to an entire claim under § 24, and may not be avoided by splitting the claim into separate lawsuits. The rule against splitting a claim is further exemplified in § 25:
The rule of § 24 applies to extinguish a claim by the plaintiff against the defendant even though the plaintiff is prepared in the second action
(1) To present evidence or grounds or theories of the case not presented in the first action, or
(2) To seek remedies or forms of relief not demanded in the first action.
We believe the instant case invokes the rule of merger embodied in the doctrine of claim preclusion. As noted above, the Owyhee County case was pending  and its issues were then limited to the parties' claims concerning farm operations  when the landowner refused to endorse joint checks issued by the crop purchaser. This conduct gave rise to an additional claim by the lessee. Although the lessee ultimately moved to amend his complaint in Owhyee County, to include such a claim, he first sought and obtained a favorable ruling on the subject matter of the claim in Ada County after the landowner intervened. The Ada County court determined that the landowner had no legal basis to refuse to endorse the checks nor to interfere with disbursement of funds from the crop purchaser to the lessee. Upon this determination the Ada County court granted the lessee the relief sought, including an award of attorney fees against the landowner. Our decision in the companion appeal has reversed the attorney fee award, for failure to satisfy the criteria of I.C. § 12-121; but it has left intact the Ada County court's determination that the landowner had no right to refuse to endorse the checks nor to interfere with disbursement of the crop proceeds.
Against this factual and procedural background, it is clear that the lessee split his claim  that the landowner wrongfully had refused to endorse the joint checks  into two different lawsuits. In Ada County, the lessee claimed that the landowner had acted wrongfully, and he sought relief in the form of direct payment from the crop purchaser as well as an award of attorney fees against the landowner. In Owyhee County, the lessee again claimed, by amended complaint, that the landowner had acted wrongfully, and he sought additional relief in the form of lost interest and punitive damages.
In both lawsuits, the lessee's claims concerning the landlord's rights and conduct were the same. The only difference between the two lawsuits was the relief sought. As noted in § 25 of the Second Restatement, quoted above, the rule against splitting a claim applies even though the remedies or forms of relief demanded in one suit are different from those demanded in another.
The lessee argues that the merger rule of claim preclusion is inapplicable because the Ada County case involved an additional party  the crop purchaser  not found in the Owyhee County suit. However, claim preclusion does not require that there be an identity of all parties in both lawsuits. Rather, it simply requires that the plaintiff whose claim may be merged and the defendant whose defense may be barred in the first lawsuit also be the parties affected by the same claim in the second suit. Thus, in Aldape v. Akins, supra, we held that a plaintiff's quiet-title claim *319 against certain defendants was barred under the doctrine of claim preclusion because the same claim  albeit on a different theory  had been asserted in a prior lawsuit against a larger group of defendants, including those named in a second suit. Moreover, in the present case, the lessee implicitly took the position before the Owyhee County court that there was an identity of parties with respect to the claim of wrongful conduct by the landowner. The lessee requested the district court to give a jury instruction similar to the one mentioned above, treating the issue of wrongful conduct as having been adjudicated conclusively between the parties in the Ada County case.
We conclude that the lessee impermissibly split his claim for wrongful conduct by the landowner between two separate lawsuits in different courts. His rights with respect to that claim were merged in the judgment obtained in the first case adjudicated  the Ada County case. That relief, affirmed on appeal, consisted of direct receipt from the crop purchaser of the lessee's share of crop proceeds, free from interference by the landowner. The lessee was not entitled later to seek additional relief, in the form of lost interest and punitive damages, upon the same claim in Owyhee County. Therefore, we hold that the Owyhee County court erred by allowing the lessee to amend his complaint, to seek such relief, after the Ada County case had gone to judgment. The judgment of the district court, insofar as it awards damages upon this claim, must be reversed.

II
We now consider issues arising from the parties' claims concerning farm operations.

A
We turn initially to the landowner's contention that the trial court erred by allowing the lessee to prove what the owner characterizes as an unpleaded "offset" against crop production expenses claimed by the owner. As noted earlier, the lessee's original complaint sought damages for crop loss and interference with pasturage rights. The owner counterclaimed for expenses such as equipment rental and storage fees. In reply the lessee merely denied owing anything for those expenses and alleged that "all justifiable claims and charges have been paid."
At trial, the lessee contended that the landowner had received payment of all rent and other sums due under the lease when the parties conducted a "settling up" conference. Over objection, the lessee presented evidence of such payment, tending to show that the only amount still owed to the landowner by the time of trial was the owner's share of checks issued by the sugar beet purchaser after the "settling up" conference. The landowner objected to this evidence, asserting that the payments in question constituted an "offset" which had not been particularly pleaded as an affirmative defense under I.R.C.P. 8(c). The trial court overruled the objection.
Rule 8(c) does not specifically list offsets among the defenses to be affirmatively pleaded. Although, as noted below, there is some case law requiring offsets to be pleaded, we need not decide how those cases would apply here. In our view, the evidence presented by the lessee did not relate to offsets. The evidence showed what the lessee had been charged for the various crop production expenses in prior years; and the evidence tended to prove that the landowner unilaterally and arbitrarily had increased the expenses claimed for the year in question. The evidence also tended to show that the lessee had not, in fact, incurred storage fees as claimed by the landowner. This evidence was directed toward proving either that the landowner's claims were invalid or that, to the extent valid, they had been paid.
BLACK'S LAW DICTIONARY 1016 (rev. 5th ed. 1979) defines payment as "the performance of a duty, promise, or obligation, or discharge of a debt or liability, by the delivery of money or other value by a debtor to a creditor." Payment connotes *320 that the particular claim made has been extinguished, in part or in whole. On the other hand, setoff is defined as "arising out of a transaction extrinsic of [the claimant's] cause of action." Id. at 1230. (Emphasis added.) In this case the lessee's performance was within the parties' lease arrangement, not extrinsic to it.
The cases cited by the landowner, holding that offsets must be pleaded, are distinguishable. Each of them deals with a transaction extrinsic to the underlying claim. For example, in Swanholm v. Reeser, 3 Idaho 476, 31 P. 804 (1892)  a suit for the price of goods sold  a buyer was not allowed to present evidence that the seller owed him for building rental and gold bullion, without having pled those offsetting claims. Similarly, in Bannock National Bank v. Rowe, 36 Idaho 197, 210 P. 140 (1922)  an action on a note  certain disbursements were treated as payments on the note, because they related to breach of a contractual prohibition against encumbrances on property. Cases involving non-contractual claims, where defendants have attempted unsuccessfully to inject offsets based upon contracts, are similarly distinguishable. See Lakey v. Caldwell, 72 Idaho 52, 237 P.2d 610 (1951); Steltz v. The Armory Co., 15 Idaho 551, 99 P. 98 (1908).
We hold that the trial court properly overruled the landowner's objection to evidence presented in opposition to the counterclaim. This being the sole substantial issue raised on appeal concerning the counterclaim, that part of the judgment denying relief on the counterclaim must be affirmed.

B
We next consider the lessee's challenge to a ruling by the trial court, taking from the jury the lessee's claim that he had sustained crop loss due to the landowner's failure to supply water. After listening to the lessee's evidence at trial, the judge concluded that the lessee had not presented sufficient evidence of damage to establish a jury question. The counts of the lessee's complaint relating to crop loss were dismissed. The judge later refused to reopen the case for presentation of more evidence.
A trial court may withdraw an issue from the jury if no substantial evidence supports the claim. Flynn v. Wackenhut Corp., 62 Or. App. 276, 660 P.2d 705 (1983) (two of plaintiff's allegations of contributory negligence held not to be supported by evidence); Johnson v. Mobile Crane Co., 1 Wash. App. 642, 463 P.2d 250 (1969). Cf. First Realty & Investment Co. v. Rubert, 100 Idaho 493, 600 P.2d 1149 (1979) (where trial court removed issue before trial ended, no error committed by failing to instruct on it). Our task on review is to determine the nature of evidence required to constitute a jury question on crop loss, and to ascertain whether substantial evidence was presented. In reviewing the record, the evidence must be viewed favorably to the lessee. See Worden v. Ordway, 105 Idaho 719, 672 P.2d 1049 (1983); Pigg v. Brockman, 85 Idaho 492, 381 P.2d 286 (1963).
The general rule on damages for breach of contract is that they "are not recoverable unless ... clearly ascertainable both in their nature and origin, and unless it is also so established that they are the natural and proximate consequence of the breach and are not contingent or speculative." Telluride Power Co. v. Williams, 172 F.2d 673, 675 (10th Cir.1949). This proscription against awarding speculative damages applies to crop losses. In order to establish recoverable damages for a crop loss, the evidence must show that the loss was produced by a defendant's conduct rather than by such other variables as weather, insects, disease, weeds or the plaintiff's own farming practices. In view of the need to identify the damage caused by the defendant, and to separate it from damage caused by other factors, it has been said that damages must be proven with reasonable certainty. Jolley v. Puregro Co., 94 Idaho 702, 496 P.2d 939 (1972). However, this does not mean that proof must be mathematically precise; rather, it means that the evidence must be sufficient to avoid speculation among multiple causes. *321 Galindo v. Hibbard, 105 Idaho ___, 678 P.2d 94 (Ct.App. 1984). Where causation is to be inferred from circumstantial evidence, the trier of fact must be able to find, reasonably, that the inference linking the defendant's conduct to the damage is more probable than an inference connecting the loss to other causes.
Moreover, the measure of damage  as well as the fact of damage  must be proven beyond speculation. Eliopulos v. Kondo Farms, Inc., 102 Idaho 915, 643 P.2d 1085 (Ct.App. 1982). Broadly speaking, the measure of damages for crop loss is the difference between the value of crops actually raised and the value of crops that would have been raised under normal conditions. Casey v. Nampa & Meridian Irrigation District, 85 Idaho 299, 379 P.2d 409 (1963).
In the present case, the lessee presented substantial evidence concerning both the fact and measure of damage from crop loss. Regarding the fact of damage, evidence was presented to connect the diminished yield to a lack of water. Although there was also evidence that crop loss may have resulted from a hail storm, the lessee's evidence, if believed, was sufficiently detailed to furnish a basis upon which the jury could have distinguished between the loss attributable to lack of water and the loss produced by the storm. In dismissing the crop loss claims, the trial court commented that the evidence allowed such a distinction, but that the evidence nevertheless was insufficient because it did not allow the differentiation to be made with "certainty." This comment demonstrates that the standard applied by the trial court reflected a literal interpretation of the word "certainty," and it failed to take account of modern cases, cited above, establishing a less rigorous burden of proof. The law does not require rigid certainty. Rather, it requires, as we have stated, that the evidence be sufficient to support a reasonable inference of causation and to allow a jury reasonably to treat that inference as more probable than an inference connecting the loss to other causes unrelated to the defendant's conduct.
With respect to the measure of damages, the trial court correctly undertook to apply the formula set forth in Casey  the difference between the value of crops actually raised and the value of crops that would have been raised under normal conditions. However, the court encountered difficulty in determining whether crop production expenses should be considered in computing this difference. The judge expressed a view that the value of crops which would have been raised under normal conditions should reflect a deduction for all expenses ordinarily incurred when raising a crop  such as planting expenses, wages of hired help, fertilizer and herbicide  regardless of whether such expenses were in any way affected by the diminished crop yield. Because these expenses were not proved by the lessee, the court ruled that the evidence was insufficient.
On this point, we believe the court erred. If a farmer's expenses of growing a crop would be the same regardless of the yield, and if those expenses actually were paid by the plaintiff, then it would be unnecessary and inappropriate to deduct a portion of those expenses from the value of the crop lost due to diminished yield. Those expenses already had been incurred with respect to the crop actually raised; and to deduct a portion of them again from the lost crop would result in "double counting" of the farmer's expenses. This, in turn, would result in understating the difference between the value of the crop actually raised and the value of crops that would have been raised under normal circumstances.
In the present case, the lessee acknowledged that some of his expenses varied according to the quantity of crop grown; and he presented evidence of those expenses. He also contended that certain other expenses did not vary according to the quantity of crop grown, and that it was unnecessary to prove those expenses. The trial court, without recognizing the critical distinction between these two classes of *322 expenses, simply ruled the evidence insufficient as a whole. We conclude that this ruling was erroneous.
The judgment of the district court, insofar as it denied the lessee's claim for crop loss, must be vacated. On remand, the trial court is instructed to apply the standards for proving the fact of damage, and the measure of damages, as set forth above.

C
Finally, the lessee asserts that he should have been awarded attorney fees at trial pursuant to I.C. § 12-120(2). However, the district court specifically determined that neither party had prevailed. In order to recover attorney fees under § 12-120(2), a party must prevail. Due to the various number of claims asserted, and the various dispositions of those issues, it was within the district court's sound discretion to find that no party had prevailed. See I.R.C.P. 54(d)(1)(B) (definition of "prevailing party").
Our opinion today does not change this result. We have, of course, changed the mix of claims upon which the parties have prevailed. As a result of our decision, the landowner, rather than the lessee, is the prevailing party on the claim relating to failure to endorse the joint checks. However, the landowner is no longer the prevailing party on the lessee's claim of crop loss. That claim remains to be determined on remand. We have not disturbed the lessee's status as prevailing party on the landowner's counterclaim. Consequently, the fundamental fact remains that the landowner and lessees are partially prevailing parties. We hold that neither of them is entitled to an award of attorney fees incurred to date, at trial or on appeal. The district court may determine the appropriateness of an award of attorney fees to either party on remand if a new trial is conducted on the crop loss claim.
In summary, the judgment of the district court is reversed insofar as it relates to the lessee's claim of wrongful refusal by the landowner to endorse the crop purchaser's joint checks. That portion of the judgment relating to the landowner's counterclaim is affirmed. The remaining part of the judgment, pertaining to the lessee's claim of crop loss, is vacated; and the case is remanded for further proceedings upon that claim. No costs or attorney fees on appeal.
WALTERS, C.J., and SWANSTROM, J., concur.
