Summation in Query?

Willis

New member
Local time
Yesterday, 19:54
Joined
May 24, 2016
Messages
4
Hi guys,

Basically I am trying to make a query (using the expression builder) which can show this if hypothetically a student enrolled in all units, how much would the total (SUM) tuition fee be?


Basically I have four tables and have been using this

Total: ([UNITS]![Credit Points]*[UNITS]![Credit Point Fee])

This doesn't really seem like a correct answer though? I don't get errors, but does anyone see an issue with my calculation/query?
 

Attachments

  • 1.PNG
    1.PNG
    19.8 KB · Views: 108
  • 2.PNG
    2.PNG
    30 KB · Views: 93
  • 3.PNG
    3.PNG
    20.5 KB · Views: 99
  • 4.PNG
    4.PNG
    22.5 KB · Views: 92
For viewers of this question, images 1 and 4 are the only ones that are relevant the others are confusing the issue.

Sorry, I thought I should post all the tables in the question.

For some reason, if I run my query I get $33k. When if I do it manually (by hand) I get $26k
 
Trying building Relationships in your database to graphically help your data structure.

It can be iIlluminating.

Simon
 
I'm not 100% sure if I have a grasp the essence of your question so I make some observations

I think it is more simple than that - from my understanding, the question is asking me to obtain the total cost of taking all the units.

Which should be the sum of all the credit points multiplied by the unit cost - which if I do manually is $26k.

However, my query gives me $33k
 
From your OP:-

I'm not sure I understand the need to use the expression builder hence I either lack some understanding of the essence of your question, or something else is wrong.

I agree with you, it seems irrelevant - the next part of the question requires it and I can do that fine, it is just this that has tricked me up.

I managed to have my query result in $26k - basically made a new query and only have the Unit table on the design view (as relations made the equation before double count things).


I think the idea behind them asking for the expression builder is that it asks next to make a query with it showing the total costs for each Student enrolled - which would be this

Each Unit Total: Sum([UNITS]![Credit Points]*[UNITS]![Credit Point Fee])
 

Users who are viewing this thread

Back
Top Bottom