If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
% of Orders that fall into discreet ranges
I would like to know what percentage of orders in my database fall into
discreet price ranges. i.e. 0 to 10K, 10-25K, etc. I have been able to set up formulas for these ranges, but when I try to use a count function I wind up getting the same count for everthing when what I really want is 0-10K: X % 10-25K: X% 25-75K: X% ect. Any ideas for doing this at the query level would be appreciated. |
#2
|
|||
|
|||
% of Orders that fall into discreet ranges
You can use this query changing table and field names to yours.
SELECT Partition([x],0,22,3) AS Range, Count([x])/DCount("x","Change Requests") AS [Percent in range] FROM [Change Requests] GROUP BY Partition([x],0,22,3); The partition function -- Partition([YourFieldName], StartNumber, EndNumber, Increment) -- KARL DEWEY Build a little - Test a little "JJP" wrote: I would like to know what percentage of orders in my database fall into discreet price ranges. i.e. 0 to 10K, 10-25K, etc. I have been able to set up formulas for these ranges, but when I try to use a count function I wind up getting the same count for everthing when what I really want is 0-10K: X % 10-25K: X% 25-75K: X% ect. Any ideas for doing this at the query level would be appreciated. |
#3
|
|||
|
|||
% of Orders that fall into discreet ranges
Karl, thank you, it did the trick!
John Pierce "KARL DEWEY" wrote: You can use this query changing table and field names to yours. SELECT Partition([x],0,22,3) AS Range, Count([x])/DCount("x","Change Requests") AS [Percent in range] FROM [Change Requests] GROUP BY Partition([x],0,22,3); The partition function -- Partition([YourFieldName], StartNumber, EndNumber, Increment) -- KARL DEWEY Build a little - Test a little "JJP" wrote: I would like to know what percentage of orders in my database fall into discreet price ranges. i.e. 0 to 10K, 10-25K, etc. I have been able to set up formulas for these ranges, but when I try to use a count function I wind up getting the same count for everthing when what I really want is 0-10K: X % 10-25K: X% 25-75K: X% ect. Any ideas for doing this at the query level would be appreciated. |
Thread Tools | |
Display Modes | |
|
|