Yes, do try out slicers. You and the users of your dashboard may find that you prefer the look and feel of those better than a data validation drop down.
Here are some instructions to set up the VBA to support a drop down.
There are two parts:
A worksheet event function that will trigger the code whenever you change your Cell that has the Data Validation list,
and a supporting subroutine.
1. Right Click on the Tab of your Sheet that has the data validation cell
2. Select View Code...
3. Copy and Paste the Sub Worksheet_Change Code below into the Sheet Code module
4. If needed, edit the Names in Blue Font to match your Master PivotTable and Field Name
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
'--if changed cell has specfied address, set the currentPage
' of pivotTable to match value of changed cell.
Dim pvt As PivotTable
Dim sErrMsg As String
'--customize these values to match your names and cell address
Const sDV_Address As String = "[COLOR="#0000CD"]$B$2[/COLOR]" 'Cell with DV dropdown to select filter item.
Const sField As String = "[COLOR="#0000CD"]Location - Name[/COLOR]" 'Report Filter Field Name
On Error GoTo ErrProc
Set pvt = Sheets("[COLOR="#0000CD"]Worksheet Voluntary[/COLOR]").PivotTables("[COLOR="#0000CD"]PivotTable2[/COLOR]")
If Intersect(Target, Me.Range(sDV_Address)) Is Nothing Or _
Target.Cells.Count > 1 Then GoTo ExitProc
Application.EnableEvents = False
Call SetCurrentPage( _
pvf:=pvt.PivotFields(sField), _
sCurrentPage:=Target.Value)
Application.EnableEvents = True
ExitProc:
On Error Resume Next
If Len(sErrMsg) Then MsgBox sErrMsg
Exit Sub
ErrProc:
Application.EnableEvents = True
sErrMsg = Err.Number & ": " & Err.Description
Resume ExitProc
End Sub
Then insert a Sub procedure into a Standard Code Module
5. Press the keys ALT + I to activate the Insert menu
6. Press M to insert a Standard Module
7. Copy and Paste the Sub below into the Standard module
Code:
Public Sub SetCurrentPage(pvf As PivotField, _
sCurrentPage As String)
'--sets Report Filter field's CurrentPage to specified value
' provides error message and clears all filters if value not found.
Dim sErrMsg As String
On Error GoTo ErrProc
With pvf
.ClearAllFilters
.CurrentPage = sCurrentPage
End With
ExitProc:
On Error Resume Next
If Len(sErrMsg) Then MsgBox sErrMsg
Exit Sub
ErrProc:
Select Case Err.Description
'--most common error is when item doesn't exist
Case "Application-defined or object-defined error"
sErrMsg = "Item: " & sCurrentPage & " not found in " & pvf.Parent.Name
Case Else
sErrMsg = Err.Number & ": " & Err.Description
End Select
Resume ExitProc
End Sub
Once you've completed that, your PivotTable and PivotChart should update each time the value of the cell with the dropdown list is changed.