<?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 Getting columns in table ordered (or grouped) by dataRoles specified in capabilities.json in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Getting-columns-in-table-ordered-or-grouped-by-dataRoles/m-p/367157#M10939</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In a custom visual I am developing (using a table data view mapping) I am trying derive which data fields are&amp;nbsp;put into&amp;nbsp;which data roles in the interface. Does anyone&amp;nbsp;have suggestions as to do that?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can iterate through the list of columns, read the keys in their "roles" object, and construct the hierarchy myself that way (using the keys from the list of data roles I have defined in capabilities.json). However, I&amp;nbsp;wonder if&amp;nbsp;Power BI doesn't a more explicit&amp;nbsp;way of doing this, as&amp;nbsp;the data fields mapping to data roles&amp;nbsp;is explicitly defined in the interface. Does anyone know?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As mentioned, the&amp;nbsp;custom visualization&amp;nbsp;uses a table data&amp;nbsp;view mapping. To construct the I have declared a series of data roles, which works as semantic groupings, which is understandable. I then select all these data roles in table.rows.select using a list of { "for": { "in": "..." } } matching the data roles.&amp;nbsp;I don't fully understand the effect of the "group" key used for the categorical view mapping:&amp;nbsp;&lt;A href="https://github.com/Microsoft/PowerBI-visuals/blob/master/Capabilities/DataViewMappings.md" target="_self"&gt;https://github.com/Microsoft/PowerBI-visuals/blob/master/Capabilities/DataViewMappings.md&lt;/A&gt; (or whether that is applicable for the table data view mapping), but perhaps that could be a way to go?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any way, any help is greatly appreciated &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 28 Feb 2018 15:39:21 GMT</pubDate>
    <dc:creator>matthiasnielsen</dc:creator>
    <dc:date>2018-02-28T15:39:21Z</dc:date>
    <item>
      <title>Getting columns in table ordered (or grouped) by dataRoles specified in capabilities.json</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Getting-columns-in-table-ordered-or-grouped-by-dataRoles/m-p/367157#M10939</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In a custom visual I am developing (using a table data view mapping) I am trying derive which data fields are&amp;nbsp;put into&amp;nbsp;which data roles in the interface. Does anyone&amp;nbsp;have suggestions as to do that?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can iterate through the list of columns, read the keys in their "roles" object, and construct the hierarchy myself that way (using the keys from the list of data roles I have defined in capabilities.json). However, I&amp;nbsp;wonder if&amp;nbsp;Power BI doesn't a more explicit&amp;nbsp;way of doing this, as&amp;nbsp;the data fields mapping to data roles&amp;nbsp;is explicitly defined in the interface. Does anyone know?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As mentioned, the&amp;nbsp;custom visualization&amp;nbsp;uses a table data&amp;nbsp;view mapping. To construct the I have declared a series of data roles, which works as semantic groupings, which is understandable. I then select all these data roles in table.rows.select using a list of { "for": { "in": "..." } } matching the data roles.&amp;nbsp;I don't fully understand the effect of the "group" key used for the categorical view mapping:&amp;nbsp;&lt;A href="https://github.com/Microsoft/PowerBI-visuals/blob/master/Capabilities/DataViewMappings.md" target="_self"&gt;https://github.com/Microsoft/PowerBI-visuals/blob/master/Capabilities/DataViewMappings.md&lt;/A&gt; (or whether that is applicable for the table data view mapping), but perhaps that could be a way to go?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any way, any help is greatly appreciated &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2018 15:39:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Getting-columns-in-table-ordered-or-grouped-by-dataRoles/m-p/367157#M10939</guid>
      <dc:creator>matthiasnielsen</dc:creator>
      <dc:date>2018-02-28T15:39:21Z</dc:date>
    </item>
    <item>
      <title>Re: Getting columns in table ordered (or grouped) by dataRoles specified in capabilities.json</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Getting-columns-in-table-ordered-or-grouped-by-dataRoles/m-p/367587#M10960</link>
      <description>&lt;P&gt;There's no better way to parse table mapping. As you mentioned values can be parsed using dataView.table.columns and roles field.&lt;/P&gt;
&lt;P&gt;Such implementaiton will allow to match column index and value index.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The group field allows to group values by particular column.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;Ignat Vilesov,&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;Software Engineer&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;Microsoft Power BI Custom Visuals&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;&lt;A href="mailto:pbicvsupport@microsoft.com" target="_blank"&gt;&lt;SPAN&gt;pbicvsupport@microsoft.com&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Mar 2018 07:29:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Getting-columns-in-table-ordered-or-grouped-by-dataRoles/m-p/367587#M10960</guid>
      <dc:creator>v-viig</dc:creator>
      <dc:date>2018-03-01T07:29:57Z</dc:date>
    </item>
    <item>
      <title>Re: Getting columns in table ordered (or grouped) by dataRoles specified in capabilities.json</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Getting-columns-in-table-ordered-or-grouped-by-dataRoles/m-p/368772#M11001</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/17823"&gt;@v-viig&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your response - nice to know further investigation would be futile.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'll mark your response as solution.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Mar 2018 14:36:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Getting-columns-in-table-ordered-or-grouped-by-dataRoles/m-p/368772#M11001</guid>
      <dc:creator>matthiasnielsen</dc:creator>
      <dc:date>2018-03-02T14:36:33Z</dc:date>
    </item>
  </channel>
</rss>

