Here are some possible solutions:
Make sure the slicer is associated with the PivotTable. Right-click the slicer, select Pivot Table Connection, and then select the field associated with the PivotTable.
Make sure that the slicer is associated with the chart on the secondary axis. Right-click the slicer, select the chart data region, and then select the data region associated with the chart on the secondary axis.
If you use multiple fields or calculated fields to create multiple series on the secondary axis, make sure that these series are set correctly. Right-click the chart on the secondary axis, select Format Data Series, and then check whether the settings of each series are correct.
If multiple axes are used, make sure that the second axis is set correctly. Right-click the secondary axis, select Format Axis, and then check whether the settings of each axis are correct.
If none of the above methods work, try to recreate the slicer and chart on the secondary axis and make sure that each step is performed correctly.