Ratio of sum (1 Viewer)

Abdallah

New member
Local time
Today, 22:01
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
 

plog

Banishment Pending
Local time
Today, 15:01
Joined
May 11, 2011
Messages
11,665
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.
 

June7

AWF VIP
Local time
Today, 12:01
Joined
Mar 9, 2014
Messages
5,490
Might be easier to accomplish in a report that uses Sorting & Grouping with aggregate calcs.
 

Abdallah

New member
Local time
Today, 22:01
Joined
Apr 12, 2021
Messages
6
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
 

Minty

AWF VIP
Local time
Today, 21:01
Joined
Jul 26, 2013
Messages
10,372
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.
 

Abdallah

New member
Local time
Today, 22:01
Joined
Apr 12, 2021
Messages
6
I tried to upload it but attach doesnot accept my file
 

Abdallah

New member
Local time
Today, 22:01
Joined
Apr 12, 2021
Messages
6
IMG_20210630_120656.jpg
 

Minty

AWF VIP
Local time
Today, 21:01
Joined
Jul 26, 2013
Messages
10,372
Have you compacted and repaired it, then put it in a Zip file?
A picture isn't much help for us to work on.
 

Minty

AWF VIP
Local time
Today, 21:01
Joined
Jul 26, 2013
Messages
10,372
How big is the Zip file?
We only need a small set of initial data and your expected results.
 

June7

AWF VIP
Local time
Today, 12:01
Joined
Mar 9, 2014
Messages
5,490
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

Top Bottom