+ Reply to Thread
Results 1 to 2 of 2

Chart Pivot Table - How to Select Only 12 Records?

  1. #1
    Registered User
    Join Date
    10-29-2009
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    1

    Chart Pivot Table - How to Select Only 12 Records?

    hi Excelers,

    This is Excel 2003.

    Thru trial-and-error, I have created a simple pivot table chart which pulls data from 1 SQL Server table. The table data contains 2 fields: a number that represents the size of a database and a date (example 1/1/2009)

    This table now has 16 rows but I want to only present the most-recent 12 months/rows in the chart.

    My trial version looks pretty good, but as more months accumulate, the chart will get too crowded.

    My simple question is how can I force the chart to pull only the most-recent/latest 12 records?

    Thanks, John

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Chart Pivot Table - How to Select Only 12 Records?

    can you not modify the SQL in the query ?

    you could perhaps use something like

    SELECT TOP 12 * FROM table ORDER BY datefield DESC

    would that work ?

    (I don't have an appropriate db to test against unfortunately)

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1