Ratio of sum

Abdallah

New member
Local time
Today, 16:32
Joined
Apr 12, 2021
Messages
6
Good morning
I have a query collect some field from other tables depend on about 5 main fields all u want to calculate ratio in every
Record which come from value of one record divided by total of some records in the same field how to do that
 
It's best to describe data issues with data. Please provide 2 sets of data:

A. STarting data from your table(s). Include table and field names and enough data to cover all cases.

B. Expected results of A. Show what data you expect your query to produce when you feed it the data from A.

Again, 2 sets of data--starting and expected.
 
Might be easier to accomplish in a report that uses Sorting & Grouping with aggregate calcs.
 
Here is the case there is a query collect 4 table all i want add another expression in query to calculate ratio of every cost type
For example main_contract has "concret"
Related to sub_main_contract has"concret ladder" related to block has "fence" all has total of estimated price
Here is the point i want ratio of every cost type from total estimated price
 
Without seeing samples of your data e.g. What you have and what you are expecting to see, no one is going to be able to magic up an answer for you I'm afraid.

Either create some samples in Excel or Upload a stripped-down version of your tables with enough data to cover all the possible outcomes.
 
I tried to upload it but attach doesnot accept my file
 
IMG_20210630_120656.jpg
 
Have you compacted and repaired it, then put it in a Zip file?
A picture isn't much help for us to work on.
 
How big is the Zip file?
We only need a small set of initial data and your expected results.
 
Trying to accomplish all in query will likely involve subquery or joining to another query that provides aggregate calcs. Still suggest this may be easier done in report design.
 

Users who are viewing this thread

Back
Top Bottom