Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2004
    Posts
    9

    Unanswered: Newbie - Charts - advice needed

    I have an sql query that counts the number of Codes for each hour of the day. There are 3 codes [50, 61 and 63]. The data I get from my sql 'group by' looks something like this:
    Code:
    Hr	Cd	Num
    --	--	---
    09	50	1
    09	61	5
    09	63	6
    10	50	25
    10	61	24
    10	63	17
    11	50	24
    11	61	12
    11	63	22
    12	50	27
    12	61	33
    12	63	7
    13	50	53
    13	61	58
    13	63	23
    14	50	51
    14	61	42
    14	63	24
    15	50	37
    15	61	12
    15	63	14
    16	50	88
    16	61	50
    16	63	4
    Hr is the hour, Cd is the code and Num is the count of Cd.

    I wish to create a table that will display the Hour on the x-axis and the count on the y-axis. There would be a seperate bar for each code. Therefore in most cases there would be 3 bars [on for each code] for every hour.

    How can I acheive this? I tried using the chart function in excel but I cant seem to get it display the data the way I want it.

    I have quite alot of data so changing any of is manually is a no no.

  2. #2
    Join Date
    Jan 2004
    Location
    Aberdeen, Scotland
    Posts
    1,067
    I would do this with a pivotchart which you can do if you have excel 2000 or higher
    that way when you create your table you can mess about with the chart to get it how you want it
    what you probably want is your data organised into a table rather than a list, which a pivottable will do easily for you,

    post back if you want any more clarification
    Dave

  3. #3
    Join Date
    Mar 2004
    Posts
    9
    Thanks for the info. I am now playing abuot with pivot table charts to see what I can get.

Posting Permissions

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