Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calculate Percent Within a Group Item

Status
Not open for further replies.

theWavist

Programmer
Jun 9, 2007
2
Can someone help me a novice with how to do this?

I have a list object grouped where my data will give three separate groups based on the data. I am trying to have a column that represents the percentage of another column's numerical value relative to just the group, not the percentage of the all three groups. Let me try to illustrate below.

For each line below, the percentage should be 50%, because the data value is 50% of the group as opposed yo 16.67% of everything which I am currently getting because my percentage field is
percent(valuefld) * 100. How do I do this at the group level?

valuefld percent
Group a 50 16.67--->should be 50%)
Group a 50 16.67

Group b 50 16.67
Group b 50 16.67

Group c 50 16.67
Group c 50 16.67
300
 
Code:
percentage([valuefld] for [group])*100

Treats each grouped value as a whole set for the percentage calc.

Ties Blom

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top