<?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 dataViewMappings Setting Up in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Custom-Visual-dataViewMappings-Setting-Up/m-p/213994#M6751</link>
    <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/36352"&gt;@ranstett&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Are you going to use it with R-script?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Ignat Vilesov&lt;/STRONG&gt;,&lt;/P&gt;&lt;P&gt;Software Engineer&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Microsoft Power BI Custom Visuals&lt;/P&gt;&lt;P&gt;&lt;A href="mailto:pbicvsupport@microsoft.com" target="_blank"&gt;pbicvsupport@microsoft.com&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 18 Jul 2017 11:49:00 GMT</pubDate>
    <dc:creator>v-viig</dc:creator>
    <dc:date>2017-07-18T11:49:00Z</dc:date>
    <item>
      <title>Custom Visual dataViewMappings Setting Up</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Custom-Visual-dataViewMappings-Setting-Up/m-p/213429#M6732</link>
      <description>&lt;P&gt;I'm working on a project to generate a custom visual that is a matrix with 2 groups (x, y) and 2 measures. Bascially it's a heatmap were the color value is measure2 while the display value is measure1. I've been able to get it working using the basic Value Data Role. But when I tried swap it out for XAxis, YAxis, Measure1, and Measure2 data roles I can't get it to work. Below is the capabilities.json file but I can't figurout the how to setup the dataViewMappings.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is an example of the data:&lt;/P&gt;&lt;P&gt;XAxis &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; YAxis &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Measure1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;SPAN&gt;Measure2 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Product1 &amp;nbsp; State1 &amp;nbsp; &amp;nbsp; &amp;nbsp; 300 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;105&lt;/P&gt;&lt;P&gt;Product2 &amp;nbsp; State1 &amp;nbsp; &amp;nbsp; &amp;nbsp; 256 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 75&lt;/P&gt;&lt;P&gt;Product1 &amp;nbsp; State2 &amp;nbsp; &amp;nbsp; &amp;nbsp; 50 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 15&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;{
  "dataRoles": [
    {
      "displayName": "Display Values",
      "kind": "Measure",
      "name": "measure1"
    },
    {
      "displayName": "Heat Values",
      "kind": "Measure",
      "name": "measure2"
    },
    {
      "displayName": "X Axis.",
      "kind": "Grouping",
      "name": "xAxis"
    },
    {
      "displayName": "Y Axis.",
      "kind": "Grouping",
      "name": "yAxis"
    }
  ],
  "dataViewMappings": [
    {
      "conditions": [
        {
          "measure1": {
            "max": 1
          },
          "measure2": {
            "max": 1
          },
          "xAxis": {
            "max": 1
          },
          "yAxis": {
            "max": 1
          }
        }
      ],
      "scriptResult": {
        "dataInput": {
          "table": {
            "rows": {
              "select": [
                { "for": { "in": "measure1" } },
                { "for": { "in": "measure2" } },
                { "for": { "in": "xAxis" } },
                { "for": { "in": "yAxis" } }
              ],
              "dataReductionAlgorithm": {
                "top": {}
              }
            }
          }
        },
        "script": {
          "scriptProviderDefault": "R",
          "scriptOutputType": "html",
          "source": {
            "objectName": "rcv_script",
            "propertyName": "source"
          },
          "provider": {
            "objectName": "rcv_script",
            "propertyName": "provider"
          }
        }
      }
    }
  ],
  "objects": {
    "rcv_script": {
      "properties": {
        "provider": {
          "type": {
            "text": true
          }
        },
        "source": {
          "type": {
            "scripting": {
              "source": true
            }
          }
        }
      }
    }
  },
  "suppressDefaultTitle": true
}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jul 2017 22:22:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Custom-Visual-dataViewMappings-Setting-Up/m-p/213429#M6732</guid>
      <dc:creator>ranstett</dc:creator>
      <dc:date>2017-07-17T22:22:13Z</dc:date>
    </item>
    <item>
      <title>Custom Visual Matrix 2 Measures capabilities.json setup</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Custom-Visual-dataViewMappings-Setting-Up/m-p/213427#M6766</link>
      <description>&lt;P&gt;I'm working on a project to generate a custom visual that is a matrix with 2 groups (x, y) and 2 measures. Bascially it's a heatmap were the color value is measure2 while the display value is measure1. I've been able to get it working using the basic Value Data Role. But when I tried swap it out for XAxis, YAxis, Measure1, and Measure2 data roles I can't get it to work. Below is the capabilities.json file but I can't figurout the how to setup the dataViewMappings.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is an example of the data:&lt;/P&gt;&lt;P&gt;XAxis &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; YAxis &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Measure1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;SPAN&gt;Measure2 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Product1 &amp;nbsp; State1 &amp;nbsp; &amp;nbsp; &amp;nbsp; 300 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;105&lt;/P&gt;&lt;P&gt;Product2 &amp;nbsp; State1 &amp;nbsp; &amp;nbsp; &amp;nbsp; 256 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 75&lt;/P&gt;&lt;P&gt;Product1 &amp;nbsp; State2 &amp;nbsp; &amp;nbsp; &amp;nbsp; 50 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 15&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;{
  "dataRoles": [
    {
      "displayName": "Display Values",
      "kind": "Measure",
      "name": "measure1"
    },
    {
      "displayName": "Heat Values",
      "kind": "Measure",
      "name": "measure2"
    },
    {
      "displayName": "X Axis.",
      "kind": "Grouping",
      "name": "xAxis"
    },
    {
      "displayName": "Y Axis.",
      "kind": "Grouping",
      "name": "yAxis"
    }
  ],
  "dataViewMappings": [
    {
      "conditions": [
        {
          "measure1": {
            "max": 1
          },
          "measure2": {
            "max": 1
          },
          "xAxis": {
            "max": 1
          },
          "yAxis": {
            "max": 1
          }
        }
      ],
      "scriptResult": {
        "dataInput": {
          "table": {
            "rows": {
              "select": [
                { "for": { "in": "measure1" } },
                { "for": { "in": "measure2" } },
                { "for": { "in": "xAxis" } },
                { "for": { "in": "yAxis" } }
              ],
              "dataReductionAlgorithm": {
                "top": {}
              }
            }
          }
        },
        "script": {
          "scriptProviderDefault": "R",
          "scriptOutputType": "html",
          "source": {
            "objectName": "rcv_script",
            "propertyName": "source"
          },
          "provider": {
            "objectName": "rcv_script",
            "propertyName": "provider"
          }
        }
      }
    }
  ],
  "objects": {
    "rcv_script": {
      "properties": {
        "provider": {
          "type": {
            "text": true
          }
        },
        "source": {
          "type": {
            "scripting": {
              "source": true
            }
          }
        }
      }
    }
  },
  "suppressDefaultTitle": true
}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jul 2017 22:19:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Custom-Visual-dataViewMappings-Setting-Up/m-p/213427#M6766</guid>
      <dc:creator>ranstett</dc:creator>
      <dc:date>2017-07-17T22:19:06Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Visual dataViewMappings Setting Up</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Custom-Visual-dataViewMappings-Setting-Up/m-p/213994#M6751</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/36352"&gt;@ranstett&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Are you going to use it with R-script?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Ignat Vilesov&lt;/STRONG&gt;,&lt;/P&gt;&lt;P&gt;Software Engineer&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Microsoft Power BI Custom Visuals&lt;/P&gt;&lt;P&gt;&lt;A href="mailto:pbicvsupport@microsoft.com" target="_blank"&gt;pbicvsupport@microsoft.com&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jul 2017 11:49:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Custom-Visual-dataViewMappings-Setting-Up/m-p/213994#M6751</guid>
      <dc:creator>v-viig</dc:creator>
      <dc:date>2017-07-18T11:49:00Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Visual Matrix 2 Measures capabilities.json setup</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Custom-Visual-dataViewMappings-Setting-Up/m-p/213996#M6767</link>
      <description>&lt;P&gt;Looks like it's a duplicate of &lt;A href="http://community.powerbi.com/t5/Developer/Custom-Visual-dataViewMappings-Setting-Up/m-p/213429#M6732" target="_blank"&gt;this one&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Ignat Vilesov&lt;/STRONG&gt;,&lt;/P&gt;&lt;P&gt;Software Engineer&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Microsoft Power BI Custom Visuals&lt;/P&gt;&lt;P&gt;&lt;A href="mailto:pbicvsupport@microsoft.com" target="_blank"&gt;pbicvsupport@microsoft.com&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jul 2017 11:50:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Custom-Visual-dataViewMappings-Setting-Up/m-p/213996#M6767</guid>
      <dc:creator>v-viig</dc:creator>
      <dc:date>2017-07-18T11:50:19Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Visual dataViewMappings Setting Up</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Custom-Visual-dataViewMappings-Setting-Up/m-p/214167#M6760</link>
      <description>&lt;P&gt;Yes I'm using an R script and Plotly. One thing I failed to mention in my previous post is that I put a Stop(&amp;lt;dataRole&amp;gt;) in to see what values are being used. For the measures I get the correct values, but for the groups I'm getting numbers and not the actual text values.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jul 2017 15:03:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Custom-Visual-dataViewMappings-Setting-Up/m-p/214167#M6760</guid>
      <dc:creator>ranstett</dc:creator>
      <dc:date>2017-07-18T15:03:12Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Visual dataViewMappings Setting Up</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Custom-Visual-dataViewMappings-Setting-Up/m-p/214676#M6769</link>
      <description>&lt;P&gt;As far as I know, Power BI might return numbers for grouping if the field contains numbers.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does this fact affect your code somehow?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Ignat Vilesov&lt;/STRONG&gt;,&lt;/P&gt;&lt;P&gt;Software Engineer&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Microsoft Power BI Custom Visuals&lt;/P&gt;&lt;P&gt;&lt;A href="mailto:pbicvsupport@microsoft.com" target="_blank"&gt;pbicvsupport@microsoft.com&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jul 2017 08:31:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Custom-Visual-dataViewMappings-Setting-Up/m-p/214676#M6769</guid>
      <dc:creator>v-viig</dc:creator>
      <dc:date>2017-07-19T08:31:07Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Visual dataViewMappings Setting Up</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Custom-Visual-dataViewMappings-Setting-Up/m-p/215975#M6800</link>
      <description>&lt;P&gt;Unfortunatly no because the data in those axis columns is text not numbers.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I change the capabilties.json file back to it's original form:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;{
  "dataRoles": [
    {
      "displayName": "Values",
      "kind": "GroupingOrMeasure",
      "name": "Values"
    }
  ],
  "dataViewMappings": [
    {
      "scriptResult": {
        "dataInput": {
          "table": {
            "rows": {
              "select": [
                { "for": { "in": "Values" } }
              ],
              "dataReductionAlgorithm": {
                "top": {}
              }
            }
          }
        },
        "script": {
          "scriptProviderDefault": "R",
          "scriptOutputType": "html",
          "source": {
            "objectName": "rcv_script",
            "propertyName": "source"
          },
          "provider": {
            "objectName": "rcv_script",
            "propertyName": "provider"
          }
        }
      }
    }
  ],
  "objects": {
    "rcv_script": {
      "properties": {
        "provider": {
          "type": {
            "text": true
          }
        },
        "source": {
          "type": {
            "scripting": {
              "source": true
            }
          }
        }
      }
    }
  },
  "suppressDefaultTitle": true
}&lt;/PRE&gt;&lt;P&gt;I can then access in my r script Values$[columnName], but the columnNames need to be hard coded. I'm basically&amp;nbsp;trying to genericize this visual so I can use it with other data.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way of seeing table definition? I tried to view it through&amp;nbsp;&lt;STRONG&gt;dataViews[0]&lt;/STRONG&gt; but that didn't seem to be available in R. Also is there a way to debug the R script with the data being sent it?&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jul 2017 16:35:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Custom-Visual-dataViewMappings-Setting-Up/m-p/215975#M6800</guid>
      <dc:creator>ranstett</dc:creator>
      <dc:date>2017-07-20T16:35:10Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Visual dataViewMappings Setting Up</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Custom-Visual-dataViewMappings-Setting-Up/m-p/216398#M6819</link>
      <description>&lt;P&gt;Could you please send an email to&amp;nbsp;pbicvsupport@microsoft.com? Or share&amp;nbsp;your email?&lt;/P&gt;&lt;P&gt;We'd like to include our R-script engineer to assist you with this issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Ignat Vilesov&lt;/STRONG&gt;,&lt;/P&gt;&lt;P&gt;Software Engineer&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Microsoft Power BI Custom Visuals&lt;/P&gt;&lt;P&gt;&lt;A href="mailto:pbicvsupport@microsoft.com" target="_blank"&gt;pbicvsupport@microsoft.com&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jul 2017 08:57:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Custom-Visual-dataViewMappings-Setting-Up/m-p/216398#M6819</guid>
      <dc:creator>v-viig</dc:creator>
      <dc:date>2017-07-21T08:57:50Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Visual dataViewMappings Setting Up</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Custom-Visual-dataViewMappings-Setting-Up/m-p/640787#M18760</link>
      <description>&lt;P&gt;Was this ever resolved? I'm going through the same process, and I'm finding myself to be lost in the capabilities options for the different dataviewmappings.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 08 Mar 2019 21:58:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Custom-Visual-dataViewMappings-Setting-Up/m-p/640787#M18760</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-03-08T21:58:42Z</dc:date>
    </item>
  </channel>
</rss>

