title: PowerBi-Javascript: How do I find out the visualName value for setting a slicer?
body: <p>I'm attempting to use Microsoft's PowerBi-Javascript library to embed a report in a webpage. I want to apply a slicer on load, that depends on the actual page I'm on (so can't be done by defaults on the report).</p>
  
  <p>The library wiki gives a way to do this by setting slicers in the config passed to the embed function. The slicer object looks something like this (from the documentation <a href="https://github.com/Microsoft/PowerBI-JavaScript/wiki/Slicers" rel="nofollow noreferrer">https://github.com/Microsoft/PowerBI-JavaScript/wiki/Slicers</a>):</p>
  
  <pre><code>interface ISlicer {
    // Selects a slicer to change.
    selector: SlicerSelector;
  
   // A new state of the slicer
   state: ISlicerState;
  }
  
  interface ISlicerSelector {
    $schema: string;
    visualName: string;
  }
  </code></pre>
  
  <p>I'm happy with setting up the state using the filtering examples given, but I'm having problems finding the visualName for the selector - I can't see it in the interface (on viewing or editing), and I've tried using the names/headers etc I can see, none of which work.</p>
  
  <p>How do I find out and/or set what this visualName is?</p>