How to calculate expression using only a part of all the data?
I'll try to explain the situation as best I can. Any help is appreciated.
I have a Customer table, and a Segment table. Segment lists lines of business, like Lumber, or Roofing, etc. Each Customer is linked with one Segment.
I'm working on a box plot, where the customer will be graphed on, say, revenue, in comparison to the other companies in the Segment.
I can calculate the individual company's revenue just by having it selected.
However, how do I calculate total revenue of just the segment "Lumber"? The TOTAL and ALL expressions give me all the revenues of all the segments, but I want to compare the customer to just their respective segment.