Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

How to calculate percentage

Dear all, I have a report which is running total Lenses of two types and both of them are using conditional counting. For example

Total Lenses 1 is counted when Linetype = C and

Total Lenses 2 is counted when Linetype = F.

I have tried using the following formula but this does not give me the right percentage.

Whileprintingrecords;
Numbervar CRLenses=0;
CRLenses:={#CRLensTotal};
CRLenses%Count ({foccredsum.stock_code});
totext(CRLenses%Count ({foccredsum.stock_code}),2)+"%"

How can I use the above formula to get a right percentage i.e. a conditional one.

Please note: Count(foccredsum.stock_code) will not give the right results until or unless Condition Linetype=C is set.

So I need to set this condition in the formula to get the right results.

The grand running total, sub total and running total are running fine.

Is it possible?

Many thanks

Regards

Jehanzeb

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question