Mark01
asked on
Crystal Reports Calculate Percentage
I am trying to calculate the percentage of each security in a given portfolio. The calculation should be value of the security divided by portfolio total. For example, in account 1, first portfolio, the percentage for Select Financial Svcs should be 400/1500 = 0.267.
I tried using a following manual formula ({@Secur_Value} / {@Acct_Sum}), but it does not calculate the correct percentage.
The report is attached. Please help solve the problem.
I tried using a following manual formula ({@Secur_Value} / {@Acct_Sum}), but it does not calculate the correct percentage.
The report is attached. Please help solve the problem.
ASKER
In the screenshot, the far right column "Secur_Percent" is the Secur_Percent formula. That formula is ({@Secur_Value} / {@Acct_Sum}).
Yes, I am looking at the first line, Select Financial Svcs, with a value of 400. The current but incorrect Secur_Percent is 0.13
I tried to attach the report file again.
Acct_Value_test.rpt
Yes, I am looking at the first line, Select Financial Svcs, with a value of 400. The current but incorrect Secur_Percent is 0.13
I tried to attach the report file again.
Acct_Value_test.rpt
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you, mlmcc. It works now. The two formulas I'm using are:
Acct_Sum2 = sum ({Acct_Value.SecValue},{tb lPortfolio s.Portfoli o})
Secur_Percent2 = {@Secur_Value} / {@Acct_Sum2}
Acct_Sum2 = sum ({Acct_Value.SecValue},{tb
Secur_Percent2 = {@Secur_Value} / {@Acct_Sum2}
I assume you are looking in the first line for 400/1500
mlmcc