+ Reply to Thread
Results 1 to 4 of 4

Control Y Axis on Pivotchart when using Slicers

  1. #1
    Registered User
    Join Date
    10-28-2010
    Location
    california
    MS-Off Ver
    Excel 2010
    Posts
    1

    Control Y Axis on Pivotchart when using Slicers

    I'm creating a PivotChart (line) and PivotTable from a Powerpivot source in Excel 2010. I'm using slicers to create buttons that update the pivottable and pivotchart based on the button selection. The Pivotchart always includes zero on the y axis, which makes many of the lines too flat to see important changes. Individually, I can set the y axis to a fixed min/max, but once a new slicer button is selected, those values will be incorrect for the new chart. How might I update the min/max of the axis to the min/max of the series for any slicer button selected?

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: Control Y Axis on Pivotchart when using Slicers

    You could try hooking into the pivottable change event.

    right click worksheet tab and view code. paste the following.

    Please Login or Register  to view this content.
    You may need to change the chart object index if you have more than 1 chart object on the sheet.
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    08-14-2009
    Location
    BC
    MS-Off Ver
    Excel 2003
    Posts
    1

    Re: Control Y Axis on Pivotchart when using Slicers

    Hi Andy,

    I had a similar issue and tried your solution. It seemed to work, but I have multiple pivot tables driving multiple pivot charts on one worksheet. Can you walk me through the steps required to update the 'chart object index'?

    Thanks in advance,
    Mike

  4. #4
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Control Y Axis on Pivotchart when using Slicers

    Mike,

    Welcome to the Forum, unfortunately:

    Your post does not comply with Rule 2 of our Forum RULES. Don't post a question in the thread of another member -- start your own thread. If you feel it's particularly relevant, provide a link to the other thread. It makes sense to have a new thread for your question because a thread with numerous replies can be off putting & difficult to pick out relevant replies.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ 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