Results 1 to 2 of 2
  1. #1
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Medians in Crosstabs (Access (any version))

    I am just starting on a new job where I need to calculate lots of medians.

    I have got median function from <post#=301021>post 301021</post#> , and can get it to work OK in queries.

    I attach a sample where it works in group by queries with one and two group by fields. Can I get it to work in a crosstab query?

    In the attachment 'qryMediansCrosstab' does not work. It was made by turning 'qryMediansGroupByTwoFactors' into a crosstab.

    Can anyone suggest a modification to this query that does work?

    I have a workaround if I need it. 'qryMediansAge_Crosstab_twosteps' does work. It is a crosstab query that takes the results of 'qryMediansGroupByTwoFactors' and crosstabs them.
    Regards
    John



  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Medians in Crosstabs (Access (any version))

    You'll have to use the two-step method.

    Added: the first query doesn't need to be a group by query.
    In the crosstab query, you can also use First instead of Max.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •