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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calculations at section level

Status
Not open for further replies.

naga5566

Technical User
Joined
Mar 14, 2003
Messages
90
Location
US
Hi all,
I have a problem with the calculations at section levels.
There are 3 sections in the following herierchies at section level.
Region -> Location ->commodity.
In the table i have fields like Product Name,Qty Sold,Unit price and a variable Total Cost(Qty sold * Unit price)


i inserted a sum for Total cost.Now the catch is when i copy the same SUM field to section level(Commodity section) the value changes.I want to display the same Value which is shown in SUM(<Total Cost>) in table in Commodity section.
The value is displayed correctly when i have only 1 row in the table at the commodity section level,if there are more than 1 row then incorrect result.

REgion : East(section)
Location : Newyork(section)
Commoidty: xyz-Tshirt(section) Incorrect Sum(Totalcost)

Product N.o |Qty Sold | Unit price | Total Cost
Row1 abc 2 $ 10 $ 20
Row2 xyz 4 $ 40 $ 160
----------------------------------------------------------
Sum : $180

I want to calculate the sum total cost at all the 3 section levels .


 
You need to look into the calculation contexts. Coulde you do something like

Sum(<Total Cost> in Body) in (<Region>, <Location>, <Commodity>)

You then need one like
Sum(<Total Cost> in Body) in (<Region>, <Location>)

and
Sum(<Total Cost> in Body) in <Region>

Steve Krandel
BASE Consulting Group
skrandel@baseconsulting.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top