• Help with totals query (2000/XP)

    Author
    Topic
    #408199

    Attached is an extract from a table on which I need to calculate some totals.

    The table has two fields, LocationCode and Type. All I need is the percentage of each Type at each location. I assume what I need to do is simple but my mind has gone blank dizzy . Any pointers gratefully appreciated.

    Viewing 3 reply threads
    Author
    Replies
    • #859667

      Just want to make sure that I understand what you want to do.

      You want to derive a percentage of the number of times that [Type] grouped by [LocationCode] is of the total count of LacationCodes.

    • #859668

      Just want to make sure that I understand what you want to do.

      You want to derive a percentage of the number of times that [Type] grouped by [LocationCode] is of the total count of LacationCodes.

    • #859675

      You can use a crosstab query to calculate the counts, and another query based on the crosstab query to calculate the percentages. See attachment.

      • #859690

        Thanks, that’s exactly what I was after. I was trying to do it all at once instead of as two queries, so I wasn’t getting anywhere.

        cheers

      • #859691

        Thanks, that’s exactly what I was after. I was trying to do it all at once instead of as two queries, so I wasn’t getting anywhere.

        cheers

    • #859676

      You can use a crosstab query to calculate the counts, and another query based on the crosstab query to calculate the percentages. See attachment.

    Viewing 3 reply threads
    Reply To: Help with totals query (2000/XP)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: