<?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 Custom Visual Measure field doesn't work in Custom Visuals Development Discussion</title>
    <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Custom-Visual-Measure-field-doesn-t-work/m-p/1987601#M3825</link>
    <description>&lt;P&gt;Hey all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am developing a custom visual and I am testing it in the developer visual on PBI service. I am trying to set up a measure field that accepts a DAX query in our DataModel. So the DAX query is&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;'Count of Vehicles = if(ISBLANK(distinctcount(Vehicles[Id])),"0",DISTINCTCOUNT(Vehicles[Id]))'&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;However, I printed the values array from the measure and it just contains 0s. I noticed this is because the queryname for this measure field is "Count of Vehicles". Whenever I add my own query into the measure field (e.g. Count of vehicleID) it works and the query name is literally the query itself. I suspect it has something to do with this.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Any help is appreciated.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;EDIT: So I've done a little more investigation and I've learned that whenever I have different columns in the categories field, it changes the measure field. If there are no categories in the category field, the measure data returns the value as expected. Is there a way to decouple the measure field from the category field?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Thu, 29 Jul 2021 15:37:11 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2021-07-29T15:37:11Z</dc:date>
    <item>
      <title>Custom Visual Measure field doesn't work</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Custom-Visual-Measure-field-doesn-t-work/m-p/1987601#M3825</link>
      <description>&lt;P&gt;Hey all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am developing a custom visual and I am testing it in the developer visual on PBI service. I am trying to set up a measure field that accepts a DAX query in our DataModel. So the DAX query is&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;'Count of Vehicles = if(ISBLANK(distinctcount(Vehicles[Id])),"0",DISTINCTCOUNT(Vehicles[Id]))'&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;However, I printed the values array from the measure and it just contains 0s. I noticed this is because the queryname for this measure field is "Count of Vehicles". Whenever I add my own query into the measure field (e.g. Count of vehicleID) it works and the query name is literally the query itself. I suspect it has something to do with this.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Any help is appreciated.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;EDIT: So I've done a little more investigation and I've learned that whenever I have different columns in the categories field, it changes the measure field. If there are no categories in the category field, the measure data returns the value as expected. Is there a way to decouple the measure field from the category field?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 29 Jul 2021 15:37:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Custom-Visual-Measure-field-doesn-t-work/m-p/1987601#M3825</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-07-29T15:37:11Z</dc:date>
    </item>
  </channel>
</rss>

