PivotTable.DrillUp-Methode (Excel)

Ermöglicht das Drillup in die Daten in einer OLAP- oder PowerPivot-basierten Cubehierarchie.

Syntax

Ausdruck. DrillUp (PivotItem, PivotLine, LevelUniqueName)

Ausdruck Eine Variable, die ein PivotTable-Objekt darstellt.

Parameter

Name Erforderlich/Optional Datentyp Beschreibung
PivotItem Erforderlich PIVOTITEM Das Element, von dem aus der Drillup ausgeführt wird.
PivotLine Optional Variant Gibt die Zeile in der PivotTable an, in der sich das Startelement des Vorgangs befindet. In Fällen, in denen PivotLine nicht angegeben ist, wird standardmäßig die oberste PivotLine verwendet, in der das Element angezeigt wird.
LevelUniqueName Optional Variant Das Ziel für einen Drillup mit mehreren Ebenen. Die Standardaktion ist, wenn sie nicht angegeben ist, ein Drillup mit einer Ebene.

Rückgabewert

LEERE

Beispiel

Im folgenden Beispielcode wird ein Drillup mit einer einzelnen Ebene für eine PivotTable veranschaulicht.

ActiveSheet.PivotTables("PivotTable1").DrillUp ActiveSheet.PivotTables( _
      "PivotTable1").PivotFields("[Customer].[Customer Geography].[Postal Code]"). _
      PivotItems( _
      "[Customer].[Customer Geography].[Postal Code].&[2450]&[Coffs Harbour]"), _
      ActiveSheet.PivotTables("PivotTable1").PivotRowAxis.PivotLines(1)

Der folgende Beispielcode veranschaulicht einen Ebenen-Drillup für ein PivotChart.

ActiveChart.PivotLayout.PivotTable.DrillUp ActiveChart.PivotLayout.PivotTable. _
      PivotFields("[Customer].[Customer Geography].[Postal Code]").PivotItems( _
      "[Customer].[Customer Geography].[Postal Code].&[2450]&[Coffs Harbour]"), _
      ActiveChart.PivotLayout.PivotTable.PivotRowAxis.PivotLines(1)

Im folgenden Beispielcode wird ein Drillup mit mehreren Ebenen für eine PivotTable veranschaulicht.

ActiveSheet.PivotTables("PivotTable1").DrillUp ActiveSheet.PivotTables( _
     "PivotTable1").PivotFields("[Customer].[Customer Geography].[City]").PivotItems _
     ("[Customer].[Customer Geography].[City].&[Coffs Harbour]&[NSW]"), ActiveSheet. _
     PivotTables("PivotTable1").PivotRowAxis.PivotLines(1), _
     "[Customer].[Customer Geography].[Country]"

Im folgenden Beispielcode wird ein Drillup mit mehreren Ebenen für ein PivotChart veranschaulicht.

ActiveChart.PivotLayout.PivotTable.DrillUp ActiveChart.PivotLayout.PivotTable. _
     PivotFields("[Customer].[Customer Geography].[Postal Code]").PivotItems( _
     "[Customer].[Customer Geography].[Postal Code].&[2450]&[Coffs Harbour]"), _
     ActiveChart.PivotLayout.PivotTable.PivotRowAxis.PivotLines(1) , _
     "[Customer].[Customer Geography].[Country]"

Support und Feedback

Haben Sie Fragen oder Feedback zu Office VBA oder zu dieser Dokumentation? Unter Office VBA-Support und Feedback finden Sie Hilfestellung zu den Möglichkeiten, wie Sie Support erhalten und Feedback abgeben können.