Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Dividing two fields on a cross table Post Reply Post New Topic
Author Message
sanur13
Newbie
Newbie


Joined: 25 Apr 2016
Location: France
Online Status: Offline
Posts: 18
Quote sanur13 Replybullet Topic: Dividing two fields on a cross table
    Posted: 23 Jun 2016 at 8:51pm
I'm doing a cross table and I already obtained two fields by using formulas, the third field is the result of dividing the first field by the second one. I can't figure out a way to do it.

Example:

Cross table:

            Jan    Feb     March
Client A    9       18       20
               3        2        5
field i'm-> 3        9        4
trying to
get




I tried using a formula that divides field 1 / field 2:

IF field2=0 THEN 0 ELSE field1/field2

but the numbers get divided and then added up, example:

If data on field 1 is (3, 4, 8) and data on field 2 is (1, 1, 1,) crystal will divide each pair and then add them up :

(3/1)+(4/1)+(8/1)=15

I'd like it to do this :

(3+4+8)/(1+1+1)=15/3=5

Edited by sanur13 - 23 Jun 2016 at 8:52pm
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.