<?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 DataView tree documentation in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/DataView-tree-documentation/m-p/2427824#M35246</link>
    <description>&lt;P&gt;I am creating a custom tree visual that's similar to a decomposition tree but I'm not sure which dataViewMapping is best for creating trees. When I was trying things out with Categorical data mapping, I found out that there is a tree data mapping which is not in Microsoft's documentation (&lt;A href="https://docs.microsoft.com/en-us/power-bi/developer/visuals/dataview-mappings" target="_blank" rel="noopener"&gt;https://docs.microsoft.com/en-us/power-bi/developer/visuals/dataview-mappings&lt;/A&gt;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jeffiefgf_0-1648667456199.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/692355iBCDCC1E2C1D585D4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jeffiefgf_0-1648667456199.png" alt="jeffiefgf_0-1648667456199.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried looking further for its documentations but I'm not able to find anything. If anyone can show me how tree data mapping works or has any suggestions about which data mapping works best with trees, it would be greatly appreciated. Thanks in advance.&lt;/P&gt;</description>
    <pubDate>Wed, 30 Mar 2022 19:26:09 GMT</pubDate>
    <dc:creator>jeffiefgf</dc:creator>
    <dc:date>2022-03-30T19:26:09Z</dc:date>
    <item>
      <title>DataView tree documentation</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/DataView-tree-documentation/m-p/2427824#M35246</link>
      <description>&lt;P&gt;I am creating a custom tree visual that's similar to a decomposition tree but I'm not sure which dataViewMapping is best for creating trees. When I was trying things out with Categorical data mapping, I found out that there is a tree data mapping which is not in Microsoft's documentation (&lt;A href="https://docs.microsoft.com/en-us/power-bi/developer/visuals/dataview-mappings" target="_blank" rel="noopener"&gt;https://docs.microsoft.com/en-us/power-bi/developer/visuals/dataview-mappings&lt;/A&gt;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jeffiefgf_0-1648667456199.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/692355iBCDCC1E2C1D585D4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jeffiefgf_0-1648667456199.png" alt="jeffiefgf_0-1648667456199.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried looking further for its documentations but I'm not able to find anything. If anyone can show me how tree data mapping works or has any suggestions about which data mapping works best with trees, it would be greatly appreciated. Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Mar 2022 19:26:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/DataView-tree-documentation/m-p/2427824#M35246</guid>
      <dc:creator>jeffiefgf</dc:creator>
      <dc:date>2022-03-30T19:26:09Z</dc:date>
    </item>
    <item>
      <title>Re: DataView tree documentation</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/DataView-tree-documentation/m-p/2427849#M35248</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/373343"&gt;@jeffiefgf&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Not sure why that's there (IIRC it has been for as long as I've been developing), but the following valid data view mappings in the API are as documented:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;single&lt;/LI&gt;
&lt;LI&gt;categorical&lt;/LI&gt;
&lt;LI&gt;table&lt;/LI&gt;
&lt;LI&gt;matrix&lt;/LI&gt;
&lt;LI&gt;scriptResult (for R visuals)&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;This can be confirmed by &lt;A href="https://github.com/microsoft/powerbi-visuals-api/blob/c5e45704e986ab4bc98a7aadc0a8539683d66d54/schema.capabilities.json#L122" target="_self"&gt;checking the schema defs for the API&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;Your best bet might be to use matrix, as this supports selections for each level of a hierarchy and has had a lot more investment in the last few API releases (particularly with fetching/lazy-loading more data from the model programmatically, although I haven't personally used it recently).&lt;/P&gt;
&lt;P&gt;Categorical has very simple support for hierarchies (either drill or expand, and you only have info about the currently displayed level), whereas matrix uses a recursive mapping that should allow you to traverse the whole dataset without user interaction.&lt;/P&gt;
&lt;P&gt;A good place to start might be to look at the &lt;A href="https://github.com/liprec/powerbi-hierarchySlicer" target="_self"&gt;source for Hierarchy Slicer&lt;/A&gt; (by Jan Pieter Posthuma), which uses this mapping and has options to filter out null levels in a dataset without modelling.&lt;/P&gt;
&lt;P&gt;Hopefully some of this can help you get started. Good luck!&lt;/P&gt;
&lt;P&gt;Daniel&lt;/P&gt;</description>
      <pubDate>Wed, 30 Mar 2022 19:53:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/DataView-tree-documentation/m-p/2427849#M35248</guid>
      <dc:creator>dm-p</dc:creator>
      <dc:date>2022-03-30T19:53:57Z</dc:date>
    </item>
    <item>
      <title>Re: DataView tree documentation</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/DataView-tree-documentation/m-p/2430160#M35264</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/397"&gt;@dm-p&lt;/a&gt;&amp;nbsp;for your reply, matrix does look like the right place to start but if I use matrix to map data, is it possible to get the values at each level, not just the leaf nodes?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I mean by that is if you look at the data structure of a matrix:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jeffiefgf_0-1648746897238.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/692924iAB764084EB812FFB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jeffiefgf_0-1648746897238.png" alt="jeffiefgf_0-1648746897238.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;we only get the "values" for the leaf node Grand child1 but not Parent1 and Child1. For the tree structure I am creating, I'll need the values for all nodes, so that it can look like something similar to this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jeffiefgf_1-1648747234837.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/692925i8A77EAB3D4AF0B59/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jeffiefgf_1-1648747234837.png" alt="jeffiefgf_1-1648747234837.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Again, thank you in advance, I am still new to this so I really appreciate your help!&lt;/P&gt;</description>
      <pubDate>Thu, 31 Mar 2022 17:28:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/DataView-tree-documentation/m-p/2430160#M35264</guid>
      <dc:creator>jeffiefgf</dc:creator>
      <dc:date>2022-03-31T17:28:05Z</dc:date>
    </item>
    <item>
      <title>Re: DataView tree documentation</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/DataView-tree-documentation/m-p/2436645#M35335</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/373343"&gt;@jeffiefgf&lt;/a&gt;&amp;nbsp;- I've never worked with more than 2 levels, but if this is how it is implemented for more than that, then you may need to 'collect' the node values on the way through and add them to your viewmodel before they are 'lost', rather than re-processing the data portion of your viewmodel entirely for each update?&lt;/P&gt;
&lt;P&gt;Failing that, someone else with more experience with the matrix mapping may be able to weigh-in.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Apr 2022 21:38:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/DataView-tree-documentation/m-p/2436645#M35335</guid>
      <dc:creator>dm-p</dc:creator>
      <dc:date>2022-04-04T21:38:13Z</dc:date>
    </item>
  </channel>
</rss>

