Recent content by bigal.nz

  1. B

    Query with percentages (Part Deux) and grouping

    Small world. The data has been obfuscated and made up. Sorry to the folks in CA :-) Churistchurch who ;-)
  2. B

    Query with percentages (Part Deux) and grouping

    Thanks, I tried that but the results are a bit odd. The percent column if full of 1's or 0's?
  3. B

    Query with percentages (Part Deux) and grouping

    Duh! My bad. I meant 1/2 = 0.5. Denom = 2.
  4. B

    Query with percentages (Part Deux) and grouping

    Hi, Sacremento has two records in September but only one is answered yes, so the calculation would be 2/1 = 50%. Denominator therefore is 1. It the percentage of records for a given month and county that are answered yes. Hope that makes sense?
  5. B

    Query with percentages (Part Deux) and grouping

    Hi All, I have a query which I need to refine. Currently it calculates a percentage across all records in the results. It actually needs to calculate percentage based on total volume by month AND area. SaleYN is discrete and has possible values 'Yes', 'No' and '' *** Mas TABLE *** DateStart...
  6. B

    Count by Week Number

    Hi All, I have this query for counting number of records per week: SELECT DatePart("ww", [DateStart]) AS weekno, count(*) FROM MAS WHERE DateStart Between #11/01/2017# AND #01/30/2018# GROUP By DatePart("ww", [DateStart]); This works great and the results look like: WEEKNO COUNT 49...
  7. B

    Count & Percentage

    Dont worry - it works nicely with round when I put the brackets in the right place.
  8. B

    Count & Percentage

    Just gave it a go - seems to work, but the results are often expressed as : 6.02743646498E-02 etc Is there a way to control the formatting here to a few decimal places? perhaps INT ( COUNT(PathWay)/(SELECT COUNT(PathWay) FROM NTH) AS PathwayPercent ) or ROUND ( COUNT(PathWay)/(SELECT...
  9. B

    Count & Percentage

    Hi All, I have a query which gives me a count of each value for Pathway SELECT NTH.Pathway, Count(NTH.Pathway) AS [Count] FROM NTH WHERE DateStart Between #01/07/2017# AND #10/11/2017# GROUP BY NTH.Pathway; This works nicely. I am wonderng if there is a way to add a colum which calculates...
  10. B

    DatePart results in #Func!

    Sorted - thanks again.
  11. B

    DatePart results in #Func!

    Windy Welly lol. I am now trying to get a bit more tricky with the query: SELECT MAS.Pathway, Count(*) As CountPathway, format([MAS.DateStart], "mmm yyyy") As MonthYear FROM MAS GROUP BY MAS.PAthway, MonthYear; However I am not getting a count per month. I am getting: Pathway Count...
  12. B

    DatePart results in #Func!

    That worked perfectly - thanks.
  13. B

    DatePart results in #Func!

    Yeah I want both.
  14. B

    DatePart results in #Func!

    Duh. That helped. Can I also return from datepart month and year?
  15. B

    DatePart results in #Func!

    Hi Guys, I am trying to use DatePart("mm", [MAS.DateStart]) in : SELECT DatePart("mm", [MAS.StartDate]) As Month FROM MAS; Some results are blank, which is fine, but the majority are #Func! The DateStart column is set to data type date. I am in NZ so we use dd/mm/yyyy. Any ideas? Cheers AL
Back
Top Bottom