<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Custom Visual - How to get selected items from a dimension? in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Custom-Visual-How-to-get-selected-items-from-a-dimension/m-p/868787#M21669</link>
    <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous,&lt;/P&gt;&lt;P&gt;It's not entirely clear from your description what the actual problem is.&amp;nbsp;The dataView contains the currently selected items in the report, for example from a slicer or other visual. If your visual's dataView contains all data then it implies there are no particular filters currently applied to it. Depending on your use case, it might be how your dataRoles are configured, or you might have to apply &lt;A href="https://docs.microsoft.com/en-nz/power-bi/developer/visuals/filter-api" target="_self"&gt;filtering&lt;/A&gt; or &lt;A href="https://docs.microsoft.com/en-nz/power-bi/developer/visuals/highlight" target="_self"&gt;highlighting&lt;/A&gt;&amp;nbsp;to do what you want with the data passed into the dataView.&lt;/P&gt;&lt;P&gt;If you are able to provide some code or a more detailed description of your expected outcomes then I might be able to provide more targeted help. Failing that, you can try posting in the &lt;A href="https://community.powerbi.com/t5/Custom-Visuals-Development/bd-p/CustomVisualsDevelopmentDiscussion" target="_self"&gt;Custom Visuals Development Discussion forum&lt;/A&gt; and the dev team can help (they only monitor that forum for questions).&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;</description>
    <pubDate>Sun, 08 Dec 2019 22:47:41 GMT</pubDate>
    <dc:creator>dm-p</dc:creator>
    <dc:date>2019-12-08T22:47:41Z</dc:date>
    <item>
      <title>Custom Visual - How to get selected items from a dimension?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Custom-Visual-How-to-get-selected-items-from-a-dimension/m-p/868650#M21668</link>
      <description>&lt;P&gt;We have a simple custom visual which has some dimensions as a&amp;nbsp;&lt;SPAN&gt;categorical type.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;With&amp;nbsp;&lt;SPAN&gt;options&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;dataViews&lt;/SPAN&gt;&lt;SPAN&gt;[&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;] etc. we get all of the possible values. But what we need is the &lt;STRONG&gt;user&amp;nbsp;selected values&lt;/STRONG&gt; instead all of them. Like when you're having country and products - if the users selects only a country we should get no value for products as no element is selected (no matter if values are possible!). Any example for this?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Got a look at the selectionManager but had to give up due to...lacking documentation(?). Using the latest API version / pbiviz.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 08 Dec 2019 12:01:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Custom-Visual-How-to-get-selected-items-from-a-dimension/m-p/868650#M21668</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-12-08T12:01:02Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Visual - How to get selected items from a dimension?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Custom-Visual-How-to-get-selected-items-from-a-dimension/m-p/868787#M21669</link>
      <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous,&lt;/P&gt;&lt;P&gt;It's not entirely clear from your description what the actual problem is.&amp;nbsp;The dataView contains the currently selected items in the report, for example from a slicer or other visual. If your visual's dataView contains all data then it implies there are no particular filters currently applied to it. Depending on your use case, it might be how your dataRoles are configured, or you might have to apply &lt;A href="https://docs.microsoft.com/en-nz/power-bi/developer/visuals/filter-api" target="_self"&gt;filtering&lt;/A&gt; or &lt;A href="https://docs.microsoft.com/en-nz/power-bi/developer/visuals/highlight" target="_self"&gt;highlighting&lt;/A&gt;&amp;nbsp;to do what you want with the data passed into the dataView.&lt;/P&gt;&lt;P&gt;If you are able to provide some code or a more detailed description of your expected outcomes then I might be able to provide more targeted help. Failing that, you can try posting in the &lt;A href="https://community.powerbi.com/t5/Custom-Visuals-Development/bd-p/CustomVisualsDevelopmentDiscussion" target="_self"&gt;Custom Visuals Development Discussion forum&lt;/A&gt; and the dev team can help (they only monitor that forum for questions).&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;</description>
      <pubDate>Sun, 08 Dec 2019 22:47:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Custom-Visual-How-to-get-selected-items-from-a-dimension/m-p/868787#M21669</guid>
      <dc:creator>dm-p</dc:creator>
      <dc:date>2019-12-08T22:47:41Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Visual - How to get selected items from a dimension?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Custom-Visual-How-to-get-selected-items-from-a-dimension/m-p/869180#M21673</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/397"&gt;@dm-p&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let me try to explain it by an example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Product&lt;/TD&gt;&lt;TD&gt;Country&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;ProdA&lt;/TD&gt;&lt;TD&gt;Italy&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;ProdB&lt;/TD&gt;&lt;TD&gt;Germany&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;ProdC&lt;/TD&gt;&lt;TD&gt;Germany&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm passing both dimensions to my custom visual. I need to distinguish between "has data/connection" and "isUserSelected". For example, user selects Italy - custom visual is getting ProdA. BUT: This is not user selected, it just has a connection to Italy. I need only Italy. IF the user now selects also ProdA &amp;amp; Italy, I should get ProdA and Italy as both are selected. It's fine to get all possible elements, but I need to check somehow if the element is really user selected or just with data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps a bit?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(and sorry for the wrong section in the forum, didnt saw it yesterday &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt; Maybe some mod could move it to the custom visual dev. place &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; )&lt;/P&gt;</description>
      <pubDate>Mon, 09 Dec 2019 08:03:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Custom-Visual-How-to-get-selected-items-from-a-dimension/m-p/869180#M21673</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-12-09T08:03:49Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Visual - How to get selected items from a dimension?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Custom-Visual-How-to-get-selected-items-from-a-dimension/m-p/869948#M21681</link>
      <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous,&lt;/P&gt;&lt;P&gt;Thanks for clarifying - I'm still not 100% sure, but it sounds like you're after the ability to have partial highlighting support on your visual (where all data is passed, but the selected values are also indicated)? If so, you need to &lt;A href="https://docs.microsoft.com/en-nz/power-bi/developer/visuals/capabilities#handle-partial-highlighting-supportshighlight" target="_self"&gt;add &lt;FONT face="courier new,courier"&gt;supportsHighlight: true&lt;/FONT&gt; to your &lt;FONT face="courier new,courier"&gt;capabilities.json&lt;/FONT&gt;&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;The previous link references a &lt;A href="https://docs.microsoft.com/en-nz/power-bi/developer/visuals/highlight" target="_self"&gt;follow-up article on coding the support for highlights&lt;/A&gt;, which documents what you'll see in your dataView after enabling the capability. You will need to compare the entries from the &lt;FONT face="courier new,courier"&gt;highlights&lt;/FONT&gt; array with those in the &lt;FONT face="courier new,courier"&gt;values&lt;/FONT&gt; array to determine which data points are affected and write code accordingly to dim/hide (or however you want to represent visually) the visual representation of these data points.&lt;/P&gt;&lt;P&gt;I hope that this gets you moving in the right direction. Good luck!&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;</description>
      <pubDate>Mon, 09 Dec 2019 19:01:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Custom-Visual-How-to-get-selected-items-from-a-dimension/m-p/869948#M21681</guid>
      <dc:creator>dm-p</dc:creator>
      <dc:date>2019-12-09T19:01:56Z</dc:date>
    </item>
  </channel>
</rss>

