Forum

Notifications
Clear all

Need Help

2 Posts
1 Users
0 Reactions
68 Views
(@srikanth-viswanathan)
Posts: 2
New Member
Topic starter
 

Hi All,

To be frank I'm a newbie when it comes to VBA coding.

I need help in terms of SYNCING slicers from a same data source but the I have 4 slicers to be in sync. Please look at the below example.

What I'm trying to do is to create a dashboard using slicers. If I'm Selecting Issue as "A", only Sub Type of "A" i.e., "1,2,3" should be filtered in slicer2 that is Issue Sub Type. After selecting Sub Type from the filtered items displayed in the slicer, respective Resolution of the Issue Sub Type should be displayed as a filtered item in slicer3. Now the tricky part is Resolution Sub Type as I need only the relevant Resolution sub type only to be displayed drilled down to the resolution, issue sub type and issue.

 used the following code found online to the get the table sync, but I was able to Sync only 3 slicers by actually creating a slave slicer.

Private Sub Worksheet_PivotTableUpdate(ByVal Target As PivotTable)
Dim wb As Workbook
Dim scShort As SlicerCache
Dim scLong As SlicerCache
Dim siShort As SlicerItem
Dim siLong As SlicerItem

On Error GoTo errHandler
Application.ScreenUpdating = False
Application.EnableEvents = False

Set wb = ThisWorkbook
Set scShort = wb.SlicerCaches("Slicer_Resolution")
Set scLong = wb.SlicerCaches("Slicer_Resolution1")

scLong.ClearManualFilter

For Each siLong In scLong.VisibleSlicerItems
    Set siLong = scLong.SlicerItems(siLong.Name)
    Set siShort = Nothing
    On Error Resume Next
    Set siShort = scShort.SlicerItems(siLong.Name)
    On Error GoTo errHandler
    If Not siShort Is Nothing Then
        If siShort.Selected = True Then
            siLong.Selected = True
        ElseIf siShort.Selected = False Then
            siLong.Selected = False
        End If
    Else
        siLong.Selected = False
    End If
Next siLong

exitHandler:
    Application.ScreenUpdating = True
    Application.EnableEvents = True
    Exit Sub

errHandler:
    MsgBox "Could not update pivot table"
    Resume exitHandler
End Sub

 

PLEASE HELP ME WITH A SOLUTION AS I'M DOING THIS AS A SMALL PROJECT TO HELP OUT MY TRAINING TEAM.

Issue Issue Sub Type Resolution Resolution Sub Type
a 1 AB 123
a 1 AB 124
a 1 AC 147
a 1 AC 148
a 1 AD 155
a 1 AD 156
a 1 AE 144
a 1 AE 145
a 2 AC 123
a 2 AC 124
a 2 AC 147
a 2 AC 148
a 2 AD 155
a 2 AD 156
a 2 AE 144
a 2 AE 145
a 3 AB 123
a 3 AB 124
a 3 AC 147
a 3 AC 148
a 3 AD 155
a 3 AD 156
a 3 AD 144
a 3 AD 145
b 4 BB 222
b 4 BB 223
b 4 BB 224
b 4 BB 225
b 4 BB 226
b 4 BB 227
b 4 BB 228
b 4 BB 229
b 5 BC 321
b 5 BC 322
b 5 BC 323
b 5 BC 324
b 5 BC 325
b 5 BC 326
b 5 BC 327
b 5 BC 328
b 6 BD 421
b 6 BD 422
b 6 BD 423
b 6 BD 424
b 6 BD 425
b 6 BD 426
b 6 BD 427
b 6 BD 428
 
Posted : 03/03/2018 10:30 am
(@srikanth-viswanathan)
Posts: 2
New Member
Topic starter
 

Please respond back to me in [email protected]

 
Posted : 03/03/2018 10:31 am
Share: