Dynamic charting issue

Mer333

Board Regular
Joined
Jun 28, 2014
Messages
54
Hello everyone!

I have a problem considering that technique - Dynamic Charting In Power Pivot « PowerPivotPro

When I create a hierarchy in PP it contains duplicated names on the lower levels due to logic below:

Brands
Categories
Subcategories
Apple
Notebooks
1 edition
Microsoft
Notebooks
2 edition
Apple
Software
1 edition
Microsoft
Software
2 edition

<tbody>
</tbody>









So therefore it produces a problem after switching. For instance, when I switch a slicer to Categories it contains duplicated categories - in this example all four above, twice notebooks, twice software. But I expect to get only unique names and sums for them.

Any ideas how to solve it?
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Hi Mer333,
unfortunately I cannot see a way around a macro here:

Code:
Private Sub Worksheet_PivotTableUpdate(ByVal Target As PivotTable)
    Dim cell As Range
    Application.ScreenUpdating = False
    For Each cell In Worksheets("HideLogic").Range("D13:O13")
        cell.EntireColumn.Hidden = cell.Value = 0
    Next cell
    Application.ScreenUpdating = True
End Sub

This will hide all empty columns everytime you change the slicer-selections (and thereby changing the connected pivottable) and then the blanks in the legends will disappear (you need to change the IFERROR-Value from "" to 0).

Will put that file in the blogpost as well.

It's really frustrating, that Excel charts have no way to dynamically adjust the number of colums (data series). It's possible with rows (Axis entries) (although quite laborious).
Maybe with the next realease? (Hope springs eternal :))
 
Upvote 0
Hi ImkeF

Thanks very much for taking the time to reply to my question.

The example helped me gained a lot of insight into cube functions! It is actually doing exactly what I want. However, instead of using cube I wanted to do it in Pivot table.

I want a pivot and with a slicer and the user can select which category (rows) they want to view by. Is that possible at all? thanks.

p.s im still quite fresh to powerpivot so still learning..
 
Upvote 0
The only way I can think of is macro, but this is not my area of expertise.
Good luck :)
 
Upvote 0
Thanks Scott,
this is a triple A: Absolutely Awesome (Although not mine) :)
Love it!
Imke
 
Upvote 0
Upvote 0
Definitely - really exiting, isn't it?

But how about an even more remote usecase: Imagine a macro specialist, who had built some very nice interactive dashboards for standard excel and is now facing the challenge to publish them in Excel Services (Sharepoint, Office 365) where macros don’t run.

WDYT?: Wouldn’t this technique be worth the efford? I mean, if you are smart enough to program macros like this, at least in my eyes the new steps to learn for this technique seem doable.
 
Upvote 0

Forum statistics

Threads
1,215,682
Messages
6,126,196
Members
449,298
Latest member
Jest

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top