public MainWindow() { InitializeComponent(); PivotTable.Cube = SampleCubes.Sales; PivotTable.HorizontalHierarchy = new DimensionHierarchyDefinition( PivotTable.Cube.Dimensions, "Year", "Quarter"); PivotTable.VerticalHierarchy = new DimensionHierarchyDefinition( PivotTable.Cube.Dimensions, "ProductCategory", "Region"); PivotTable.Loaded += (s, e) => { PivotTable.Refresh(); }; }