xtrim Posted November 2, 2010 Posted November 2, 2010 Hi, I have the following tables: Visits[VisitID,PatientID] Prescriptions [VisitID,DrugId,Amount] DrugDetail [DrugID,DrugName,Category] On the "Visits" layout I am trying to put a chart that on Axis X will show the drug Category, and on Axis Y the total amount for that category.. I've been trying for hours with all the possible combinations but all my efforts didn't help Any suggestion?
comment Posted November 2, 2010 Posted November 2, 2010 This is not a charting problem. Unless you define some additional relationships and calculations, you cannot see sub-summarized child (Prescriptions) data from the parent (Visit) record. It's much easier to produce such chart on a layout of Prescriptions.
xtrim Posted November 2, 2010 Author Posted November 2, 2010 Hi, tnx or your reply. I know it is easier on the prescription layout...but I need it on the Visits layout...that is the problem. I tried to define all sort of relationships and calcs but still to no use... what am I missing with this chart?
comment Posted November 2, 2010 Posted November 2, 2010 What do you want to do with categories for which the total is zero? Do you want to display them as zero, or omit them altogether?
xtrim Posted November 2, 2010 Author Posted November 2, 2010 omit...there shouldn't be zero's anyways...
comment Posted November 2, 2010 Posted November 2, 2010 See the attached for one way to look at it. In your situation it might be best to lookup the category into the prescription, otherwise you'll need more relationships. Another option is to script the process and trigger the script on record load. Or perhaps use a custom function along the lines of: http://www.briandunning.com/cf/894 The bottom line here is that you cannot chart data that you cannot display. SubSummarizeChildUgo.zip
Recommended Posts
This topic is 5145 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now