Hi,
please help me modify my pivot:
- in this moment I shows "xxx ID" with section for "Published" and "Due Date"
I just want in "Due Date" shows ONLY MAX "DUE DATE" (should be one value).
In this moment I see all available value.
regards,
PvK
please help me modify my pivot:
- in this moment I shows "xxx ID" with section for "Published" and "Due Date"
Code:
Sub CreatePivotTable()
Dim PTcache As PivotCache
Dim PT As PivotTable
Application.ScreenUpdating = False
On Error Resume Next
Application.DisplayAlerts = False
Sheets("PivotSheet").Delete
On Error GoTo 0
Set PTcache = ActiveWorkbook.PivotCaches.Create( _
SourceType:=xlDatabase, _
SourceData:=Range("A1").CurrentRegion.Address)
Worksheets.Add
ActiveSheet.Name = "PivotSheet"
ActiveWindow.DisplayGridlines = False
Set PT = ActiveSheet.PivotTables.Add( _
PivotCache:=PTcache, _
TableDestination:=Range("A1"), _
TableName:="ABC")
With PT
.PivotFields("xxx ID").Orientation = xlPageField 'sortowanie, filtrowanie, pokazanie 1 recordu
.PivotFields("xxx ID").Orientation = xlRowField 'wyswietlanie wszystkich recordow
.PivotFields("xxx ID").Position = 1
.PivotFields("Published").Orientation = xlRowField
.PivotFields("Published").Position = 2
.PivotFields("Due Date").Orientation = xlRowField
.PivotFields("Due Date").Position = 3
.RowAxisLayout xlTabularRow
Columns("B:B").EntireColumn.AutoFit
Columns("C:C").EntireColumn.AutoFit
Columns("A:A").EntireColumn.AutoFit
ActiveSheet.PivotTables("ABC").PivotFields("xxx ID").Subtotals = Array( _
False, False, False, False, False, False, False, False, False, False, False, False)
ActiveSheet.PivotTables("ABC").PivotFields("Published").Subtotals = Array( _
False, False, False, False, False, False, False, False, False, False, False, False)
ActiveSheet.PivotTables("ABC").PivotFields("Due Date").Subtotals = _
Array(False, False, False, False, False, False, False, False, False, False, False, False)
.DisplayFieldCaptions = True
End With
End Sub
I just want in "Due Date" shows ONLY MAX "DUE DATE" (should be one value).
In this moment I see all available value.
regards,
PvK