Skip to Content
0
Former Member
Dec 05, 2008 at 10:35 AM

Problem with Crosstab Cumulative percentage

36 Views

Morning all,

I have setup my report based on Sales Area (Group) and used Cross tab to show each area's Number of days, Jobs and percentages.

I wanted the percentage to be cumulative so I used a formula on Display String of the Percentage section.

However, the new cumulative percentage doesn't seem to be working properly.

For example, at some places the percentage is showing as 100% where as the Currentfieldvalue = 1 and Total Value = 252 (which makes it to 0.39% and not 100%).

Could someone please look into the formula and provide me with some sort of suggestion/solution to this issue?

Here is the formula

Whileprintingrecords;
Numbervar h:=Currentfieldvalue;
Numbervar g:={@TotalJobs-CanceledJobs};
Numbervar b:=0;
b:=(h/g)*100;
Numbervar gTot:=b+gTot;
if gTot > 100 then "100.00%" else
totext(gTot,2) + "%";

if I remove gTot > 100 then "100.00%" the value changes to 105.1% which is again incorrect.

Regards

Jehanzeb