+ Reply to Thread
Results 1 to 15 of 15

Keep losing percentages on Pivot Chart

  1. #1
    Forum Contributor
    Join Date
    10-04-2007
    Posts
    118

    Keep losing percentages on Pivot Chart

    In the attached Excel workbook, I’ve created a Pivot Chart.

    I keep on losing the percentages that sit on top of the bar charts, every time I change the filter on the service pivot

    Is it possible to maintain them for each individual service, so their percentages are as clear as possible?
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    01-25-2008
    Location
    The Netherlands
    MS-Off Ver
    2002, 2003, 2007
    Posts
    94

    Known issue...but Microsoft has a workaround...

    Hi there,

    This seems to be a known issue, as Microsoft is referring to it in this article :http://support.microsoft.com/kb/215904

    Hope this helps

    J.

  3. #3
    Forum Contributor
    Join Date
    10-04-2007
    Posts
    118
    thanks jevni1974

    that link was great... a solution to this problem is adding a macro that record the actions of changing the format... which i have done successfully... but unfortunately the control toolbox doesn't allow me to select command button as it is shodowed out (deselected)

    hope you can help

    thanks in advance

  4. #4
    Registered User
    Join Date
    01-25-2008
    Location
    The Netherlands
    MS-Off Ver
    2002, 2003, 2007
    Posts
    94

    .....lets see

    Okay...so one step closer again...but still a step behind

    can you post your updated excel file so I can have a look?

  5. #5
    Forum Contributor
    Join Date
    10-04-2007
    Posts
    118
    hi mate,

    attached is the sample, i've recorded a macro that adds the formating back to the Pivot chart
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    01-25-2008
    Location
    The Netherlands
    MS-Off Ver
    2002, 2003, 2007
    Posts
    94

    Thumbs up ...tadaaaaaa

    Well....

    Okay... have a look at the sheet now.
    I added a rectangle to which I assigned a macro (have a look at the popup menu when you right-click on the rectangle)

    I guess that works fine as a command button right?

    J.
    Attached Files Attached Files

  7. #7
    Forum Contributor
    Join Date
    10-04-2007
    Posts
    118
    cheers mate you a star

  8. #8
    Forum Contributor
    Join Date
    10-04-2007
    Posts
    118
    Hi mate...

    I'm asking a little favour, i'm just being a bit picky, i'm wondering instead of adding an Autoshape to the Pivot Chart, is it possible to create a drop down combo box which is similar to the one already on the sheet, and when a selection is made the label is added automatically....

    i hope i havent confused you... please come to me for more clarification (if need)

    thanks in advance

  9. #9
    Registered User
    Join Date
    01-25-2008
    Location
    The Netherlands
    MS-Off Ver
    2002, 2003, 2007
    Posts
    94
    Hi there.... picky??? neah some people just want the perfect solution I guess....

    a dropdown combobox is a control like a command button...
    which can not be added to the pivot table chart....
    so this is not possible I'm afraid.

    an alternative would be to look if there is a VBA construction possible that catches the events taking place in the pivot chart and run the macro based on these...

    Since a pivot chart is based on a pivot table and there is a VBA event called 'Worksheet_PivotTableUpdate' I created an event procedure in the module of sheet 2 (Pivot Data) and put the macro code in the event procedure.

    the result is attached :D

    Have fun
    Attached Files Attached Files
    J.

  10. #10
    Forum Contributor
    Join Date
    10-04-2007
    Posts
    118
    you a star... its perfect... its exactly what i needed.... for my problem

    do you mind if i ask how you did it... would like to know how your miracles are done... lol

    if you have time is...

    can you point me to a peice of code...

    thanks again

  11. #11
    Registered User
    Join Date
    01-25-2008
    Location
    The Netherlands
    MS-Off Ver
    2002, 2003, 2007
    Posts
    94
    Hi ... good to see you're happy at last

    you can find the code the following way:
    1. select Tools -> Macro -> Visual basic editor (or press ALT F11)
    2. double-click on Sheet 2 (Pivot Data) (see attached picture as well)

    this will open up the VBA Module belonging to Sheet 2.
    That is where the code should be as the pivot table of the chart is on Sheet 2 and the code is activated through the worksheet event 'PivotTableUpdate'.

    This event takes place if the pivot table is changed. And that is what happens when you make selections in the pivot chart.

    Hope this helps
    Attached Images Attached Images

  12. #12
    Forum Contributor
    Join Date
    10-04-2007
    Posts
    118
    thanks... something I could look into Event Procedures... they are a great feature to learn... thanks again....

    Whats the best to learn VBA... its a great tool to have

  13. #13
    Forum Contributor
    Join Date
    10-04-2007
    Posts
    118
    Hi jevni1974,

    Thanks for that mate,

    Having incorporated the VBA code into my worksheet, I've noticed that it applies the formatting to every single PivotChart, (All of my pivot tables are stored in a single worksheet)

    In the document I have a number of different Graphs that I wish not to add the formatting too.

    Is it possible to alter the code so I can state which PivotTables I would like to incorporate.

    I've tried modifying the code so it will incorporate this.... Unfornately it doesn't compile correctly.



    Please Login or Register  to view this content.

  14. #14
    Forum Contributor
    Join Date
    10-04-2007
    Posts
    118
    a quick solution to that problem was to remove the pivot tables that I didn't need the formatting applied to and place them onto a seperate sheet...

    as all the pivot tables are hidden from view, it wouldn't matter what page they where on...

    thanks again

  15. #15
    Registered User
    Join Date
    01-25-2008
    Location
    The Netherlands
    MS-Off Ver
    2002, 2003, 2007
    Posts
    94
    Hi there,

    the Worksheet_PivotTableUpdate event applies to all pivot tables that are located on the specific worksheet.

    Indeed the solution would be to move the pivottables you don't want to change to another sheet. on tat other sheet you can then define again a Worksheet_PivotTableUpdate event procedure that may be doing other things for you.

    Have fun :D

+ 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