Search results

  1. J

    Top N Query based on group averages

    Sorry, I have them calculated in another query that I pull from.
  2. J

    Top N Query based on group averages

    This only works to get the average of each, which I have. I cann't get it to bring back the top 10% averaged in each group.
  3. J

    Top N Query based on group averages

    I am using FarmCostAcres/AcresPlanted to get the total profitability. EDIT: I just saw your database on UA. How do you determine ProfitPerBushel? A quick query SELECT tblGrowerData.WaterSourceType , tblGrowerData.Crop , Avg(tblGrowerData.Yield) AS AvgOfYield FROM tblGrowerData GROUP BY...
  4. J

    Top N Query based on group averages

    Here is the db attached.
  5. J

    Top N Query based on group averages

    I have three tables: tblCooperative -> CooperativeCity, CooperativeState, CooperativeName, CooperativeNumber tblGrower -> CustomerName, CustomerNumber, CustomerState, CooperativeNumber tblGrowerData -> WaterSourceType, Crop, CustomerNumber, CustomerYear, NumberofACres, FarmExpenses (there are...
  6. J

    Top N Query based on group averages

    I need to create a query where in the end, I will have four rows of data based on based on two combinations of WaterSourceType and Crop. I need the query to bring back the results of the average Top N (lets say Top 10%) for each combination. I have tried this every which way and I can't seem...
  7. J

    Between parameter with null values

    That worked great Paul. Thanks much!!!!!
  8. J

    Between parameter with null values

    Maybe I am confused here...or I'm not understanding. I have the years set for the parameter fine. It's that I want to filter sales ranges. The user will enter a sales range to pull the accounts between those ranges. Beginning Sales: 100,000,000 Ending Sales: 500,000,000 The results would...
  9. J

    Between parameter with null values

    OK, thanks for that suggestion. I am unclear though on how the NZ function would work in this situation. I am trying to filter via a sales range and not date for this parameter.
  10. J

    Between parameter with null values

    SELECT Profitable.CHSAcctNo, Profitable.GrossRevenue, Profitable.FarmSupplyRev, Profitable.GrainRev, Profitable.Expenses, Profitable.OtherIncome, Profitable.OtherExp, Profitable.CHSAcctNo AS CountOfCHSAcctNo, Profitable.City, Profitable.State, Profitable.[MS/CO], Profitable.[Grain/FS]...
  11. J

    Between parameter with null values

    Thanks for the replys but I am getting invalid syntax on both of these: Include: Iif(Isnull([forms]![frmState]![BeginningSalesRange]) OR IsNull([Forms]![frmState]![EndingSalesRange]) OR Between [forms]![frmState]![BeginningSalesRange] And [Forms]![frmState]![EndingSalesRange], 1,0) WHERE...
  12. J

    Between parameter with null values

    I am trying to alter this parameter to bring back all records if either beginningsalesrange or ending salesrange is left blank. I can't quite get it right. Thanks Between [forms]![frmState]![BeginningSalesRange] And [Forms]![frmState]![EndingSalesRange]
  13. J

    Totals Query with 0 amounts

    Here is my issue in greater detail. Sorry for not being more specific...I've tried Dsum, Davg, Dlookup and nothing works correctly. I have a totals query that is I have a DSum field where I want to sum only the field in these column where the salary expense is greater than 0: GrossRev...
  14. J

    Totals Query with 0 amounts

    What I am actually looking for is how to average the numbers as I can in this Excel formula that simply skips over the zeros and doesn't use those in the calculations. = AVERAGEIF( M2:M7, "<>0" )
  15. J

    Totals Query with 0 amounts

    I am working on a Totals Query. The query has a lot of calculations in it. I have one expression for Salary as a % of Gross Revenue. My issue is that I don't have salary information for each row (account). I only want to calculate the totals of those accounts with salary information without...
Back
Top Bottom