<?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 - Conditional formatting title in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Custom-Visual-Conditional-formatting-title/m-p/750651#M20129</link>
    <description>&lt;P&gt;Glad you're rocking &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;JS/TS can typically be tricky to debug, particularly if it's all running client-side and I've gotten into the habit of writing to the console throughout the lifecycle of my visual so that I can understand exactly where things go wrong, if they do. I disable this for release versions of my visuals, but it's invaluable when developing.&lt;/P&gt;</description>
    <pubDate>Sun, 28 Jul 2019 07:35:20 GMT</pubDate>
    <dc:creator>dm-p</dc:creator>
    <dc:date>2019-07-28T07:35:20Z</dc:date>
    <item>
      <title>Custom Visual - Conditional formatting title</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Custom-Visual-Conditional-formatting-title/m-p/745050#M20052</link>
      <description>&lt;P&gt;I have built a custom visuals that becomes unresponsive as soon as I add a custom expression in the "Title". If the title is hard coded e.g. if I write "abc" in the title, it works fine. However, if I use the new feature,&amp;nbsp;&lt;A href="https://docs.microsoft.com/en-us/power-bi/desktop-conditional-format-visual-titles" target="_self"&gt;conditional-format-visual-titles&lt;/A&gt; it stops working.&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Duing some digging I found the following which I can't get my head around:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I define my data roles as&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;PRE&gt;"dataRoles": [
{
"displayName": "Values",
"name": "values",
"kind": "Measure"
}
]&lt;/PRE&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;and use this with "Expresssion based Title", the visual doesn't work.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;if I change the data role as below, it works as expected.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;PRE&gt;"dataRoles": [
{
"displayName": "Values",
"name": "measure",
"kind": "Measure"
}
]&lt;/PRE&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;If I use any "name" other than "measure", along with "Expression based Title", it completely stops working.&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;BR /&gt;Not sure where to even start looking&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;BR /&gt;Thanks&lt;/SPAN&gt;&lt;/DIV&gt;</description>
      <pubDate>Sun, 21 Jul 2019 00:18:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Custom-Visual-Conditional-formatting-title/m-p/745050#M20052</guid>
      <dc:creator>Nishantjain</dc:creator>
      <dc:date>2019-07-21T00:18:29Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Visual - Conditional formatting title</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Custom-Visual-Conditional-formatting-title/m-p/745277#M20054</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/61993"&gt;@Nishantjain&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;I've just tested this real quick in a test visual I had created recently and it seems to work fine.&lt;/P&gt;&lt;P&gt;I think that your issue might be unrelated to the condtional title, and is more to do with the &lt;FONT face="courier new,courier"&gt;dataRole&lt;/FONT&gt; but without more code, it's hard to confirm.&lt;/P&gt;&lt;P&gt;If you rename the &lt;FONT face="courier new,courier"&gt;dataRole&lt;/FONT&gt;, you'll also need to update any code you've written to process the &lt;FONT face="courier new,courier"&gt;dataView&lt;/FONT&gt; to use the revised name too, otherwise your code will crash out and the visual will stop rendering, unless you add some error handling around it.&lt;/P&gt;&lt;P&gt;Are you able to share the part of your code that processes the &lt;FONT face="courier new,courier"&gt;dataView&lt;/FONT&gt;? We can probably solve it pretty quickly if so.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jul 2019 02:06:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Custom-Visual-Conditional-formatting-title/m-p/745277#M20054</guid>
      <dc:creator>dm-p</dc:creator>
      <dc:date>2019-07-22T02:06:36Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Visual - Conditional formatting title</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Custom-Visual-Conditional-formatting-title/m-p/750634#M20127</link>
      <description>&lt;P&gt;&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;Thanks Daniel for your reply. I was able to figure out the issue was with my "DataView" mapping. The didn't had all my fields mapped in DataView. The visual is now working as expected.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;However, the frustrating thing is that the unexpected behaviour was quite difficult to debug. I can't understand why it will be a problem only for "expression based" title.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I guess this isn't an issue that a lot of peoeple have faced.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again for your help&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Nishant&lt;/P&gt;</description>
      <pubDate>Sun, 28 Jul 2019 06:43:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Custom-Visual-Conditional-formatting-title/m-p/750634#M20127</guid>
      <dc:creator>Nishantjain</dc:creator>
      <dc:date>2019-07-28T06:43:06Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Visual - Conditional formatting title</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Custom-Visual-Conditional-formatting-title/m-p/750651#M20129</link>
      <description>&lt;P&gt;Glad you're rocking &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;JS/TS can typically be tricky to debug, particularly if it's all running client-side and I've gotten into the habit of writing to the console throughout the lifecycle of my visual so that I can understand exactly where things go wrong, if they do. I disable this for release versions of my visuals, but it's invaluable when developing.&lt;/P&gt;</description>
      <pubDate>Sun, 28 Jul 2019 07:35:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Custom-Visual-Conditional-formatting-title/m-p/750651#M20129</guid>
      <dc:creator>dm-p</dc:creator>
      <dc:date>2019-07-28T07:35:20Z</dc:date>
    </item>
  </channel>
</rss>

