+ Reply to Thread
Results 1 to 2 of 2

How to Sync two Slicers to two Different OLAP Data Sources

  1. #1
    Registered User
    Join Date
    08-11-2017
    Location
    Bellevue, WA
    MS-Off Ver
    2013
    Posts
    7

    How to Sync two Slicers to two Different OLAP Data Sources

    Hi, here is the situation.



    I have one pivot table that lists products and various data associated with them such as color/size/qty etc and has a slicer that controls which Styles are selected.

    I have another pivot table that I have created to show the Status of styles, such as active, discontinued, future discontinued, closeout, etc.

    They both have separate OLAP data sources and I have been scouring online for a way to make it so that the Status pivot with slicer has the same items selected as the first pivot/slicer.

    The closest I have found is this code that is originally for syncing a an OLAP pviot to a non-OLAP pivot. I found a comment that suggested a modification to make it OLAP to OLAP, but have been unable to make it work.

    I changed the 2 items in red to match the 2 slicers I'm working with. I believe I need to change the [CleanedData].[RegionCode] portion in the code to suit my needs, but I'm not quite sure how to do so. From Debug.print, I've figured the path would be [ProductStyleColorSize].[Style].[Style], but I'm unsure how to work that in.

    So far, if I run the code as I have posted, with the changes suggested, I get a Error 13 Type Mismatch at "Set sO = scOLAP.SlicerCacheLevels(1)". I assume I'll also get that at the next line, since it has the same modification.

    Please Login or Register  to view this content.


    The modification that was suggested on the post was

    Set SL = scList.SlicerCacheLevels(1)
    For Each sI In SL.SlicerItems
    .......
    Next
    Any help would be greatly appreciated. Thank you!

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: How to Sync two Slicers to two Different OLAP Data Sources

    Create a pivot table from one of the data sets where the report filter is the column the slicer controls. Set the slicer up to control both pivot tables.

    Then do the same thing with the other data set.

    Then create an event so that when one of the filters is changed copy the value to the other filter. Don't forget to turn off events between detection and copying or you will wind up in an infinite loop.

    This technique will only work if both data sets have the same values for the field.
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 2
    Last Post: 04-29-2020, 04:49 PM
  2. Sync 2 slicers with slightly different values
    By WolfX2 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-11-2017, 04:49 AM
  3. Slicers to sync multiple pivots from multiple data sources?
    By cantona_lives in forum Excel Charting & Pivots
    Replies: 8
    Last Post: 06-21-2017, 12:33 PM
  4. Linking Slicers from Different Sources
    By SAFC in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-20-2015, 11:35 AM
  5. Synchronize Slicers with multiple data sources
    By dkjhn in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-22-2015, 02:56 PM
  6. Sync pivot slicers from different database by vba
    By carrieliu in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-06-2013, 04:47 AM
  7. [SOLVED] PivotTables and OLAP sources
    By Gilles Desjardins in forum Excel General
    Replies: 0
    Last Post: 02-11-2006, 06:55 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1