Results 1 to 7 of 7
  1. #1
    jamal numan is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jan 2011
    Location
    Ramallah, West Bank
    Posts
    113

    Question Summarizing a given table in this way,

    Summarizing a given table in this way,



    Please, have a look on the attached screenshot. How can I derive the indicated table from the existing one?

    The data is attached


    Thank you

    Best

    Jamal
    Attached Thumbnails Attached Thumbnails Clip_97.jpg  
    Attached Files Attached Files

  2. #2
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    SELECT "Male Size Total" AS Label, Sum(Family.MaleSize) AS SumOfMaleSize
    FROM Family
    GROUP BY "Male Size Total"
    UNION ALL
    SELECT "Female Size Total" AS Label, Sum(Family.FemaleSize) AS SumOfFemaleSize
    FROM Family
    GROUP BY "Female Size Total";

  3. #3
    jamal numan is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jan 2011
    Location
    Ramallah, West Bank
    Posts
    113
    Quote Originally Posted by rpeare View Post
    SELECT "Male Size Total" AS Label, Sum(Family.MaleSize) AS SumOfMaleSize
    FROM Family
    GROUP BY "Male Size Total"
    UNION ALL
    SELECT "Female Size Total" AS Label, Sum(Family.FemaleSize) AS SumOfFemaleSize
    FROM Family
    GROUP BY "Female Size Total";
    Thank you very much rpeare for the help. This is fantastic.

    Just in case if I wanted to stick the percentage sign with the numbers then how could I do this (please, have a look on the attached screenshots)?


    For other types of queries it is simple, just once can choose the format from the property sheet pane (attached).


    Best

    Jamal
    Attached Thumbnails Attached Thumbnails Clip_104.jpg   Clip_105.jpg  

  4. #4
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    Each part of the union query would have to have the percentage column in it before you did the union OR you create a query that is based on the union query and add the calculation to that.

    Personally I'd do the former rather than the latter if the result of your union query is the picture on the right (minus the percent column).

    Without seeing your union query statement I'd be guessing though.

  5. #5
    jamal numan is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jan 2011
    Location
    Ramallah, West Bank
    Posts
    113

    Question

    Quote Originally Posted by rpeare View Post
    Each part of the union query would have to have the percentage column in it before you did the union OR you create a query that is based on the union query and add the calculation to that.

    Personally I'd do the former rather than the latter if the result of your union query is the picture on the right (minus the percent column).

    Without seeing your union query statement I'd be guessing though.
    Very much appreciated rpeare for the prompt answer,

    I’m attaching a screenshot of what I wanted to do and the data itself. I'm thankful for your help.

    Best

    Jamal
    Attached Thumbnails Attached Thumbnails Clip_115.jpg  
    Attached Files Attached Files
    • File Type: mdb G.mdb (468.0 KB, 3 views)

  6. #6
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    I don't understand, the example I gave you was using union queries, which I thought was giving you what you wanted, but your screen shot shows no union queries, nor does it correspond to query you showed in post #3, it looks almost identical to the first post in terms of contents and layout.

  7. #7
    jamal numan is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jan 2011
    Location
    Ramallah, West Bank
    Posts
    113

    Question

    Quote Originally Posted by rpeare View Post
    I don't understand, the example I gave you was using union queries, which I thought was giving you what you wanted, but your screen shot shows no union queries, nor does it correspond to query you showed in post #3, it looks almost identical to the first post in terms of contents and layout.
    Sorry for the confusion. My bad.

    You are right. I just started it again from scratch to see how the union could be built to preserve the percentage (%) format. I tried it and found out that the unions doesn’t keep it in the output query table

    Then which union syntax will keep the percentage sign?

Please reply to this thread with any new information or opinions.

Similar Threads

  1. hello Everyone who can give help on this ?
    By YaseenIskaf in forum General Chat
    Replies: 1
    Last Post: 05-23-2013, 01:57 PM
  2. Replies: 5
    Last Post: 05-14-2012, 02:01 PM
  3. Should I give Up on This Form?
    By Palomino33 in forum Forms
    Replies: 25
    Last Post: 11-09-2011, 05:37 AM
  4. Summarizing records in a subreport
    By goodguy in forum Reports
    Replies: 5
    Last Post: 09-24-2011, 10:32 AM
  5. Trouble Summarizing in Group Footer
    By Millerguitarworks in forum Reports
    Replies: 2
    Last Post: 12-07-2009, 06:06 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums