title: How to find data source of a slicer for a pivot table via the Excel UI?
body: <p>Note: I don't think it makes any fundamental difference, but I am working with pivot tables running on top of a PowerPivot model.</p>
  
  <p>Example scenario:  </p>
  
  <p>Three tables in a model:  SalesTransaction, BuyerCustomers, SellerCustomers, with a two defined PowerPivot relations:  </p>
  
  <pre><code>BuyerCustomers.CustomerCode --&gt; SalesTransaction.BuyerCustomerCode
  SellerCustomers.CustomerCode --&gt; SalesTransaction.SellerCustomerCode
  </code></pre>
  
  <p>I have a PivotTable defined using SalesTransaction as the data source.</p>
  
  <p>Now, if I want to create slicers on both BuyerCustomer and SellerCustomer, in the Pivot Table fields window I can right click and "add as slicer" on either:</p>
  
  <ol>
  <li><code>SalesTransaction.BuyerCustomerCode</code> and <code>SalesTransaction.SellerCustomerCode</code> (the two columns in the transaction table)  </li>
  <li><code>BuyerCustomers.CustomerCode</code> and <code>SellerCustomers.CustomerCode</code> (the individual lookup tables)  </li>
  </ol>
  
  <p>Either way, the behavior is identical.  My question is:  once this has been set up, <strong>how can one tell what a slicer is bound to via the UI in Excel</strong>?  Other than being able to deduce the obvious association via column names, how does one tell?</p>
  
  <p><strong>Using VBA</strong>, one can discover the association like so:</p>
  
  <pre><code>ActiveWorkbook.SlicerCaches("Slicer_CustomerCode").SourceName  
  </code></pre>
  
  <p>...which yields:  </p>
  
  <pre><code>"[SalesTransaction].[BuyerCustomerCode]"  
          or  
  "[BuyerCustomers].[CustomerCode]"
  </code></pre>
  
  <p>....but as far as I can tell, there is no way to see this via the UI.</p>