<?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 Blank Value in Javascript/Typescript in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Custom-Visual-Blank-Value-in-Javascript-Typescript/m-p/1847418#M29464</link>
    <description>&lt;P&gt;Hi @Anonymous&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;If you're attempting to modify a visual that is already published in AppSource, Power BI will always look it up and load it from there, based on its &lt;FONT face="courier new,courier"&gt;guid&lt;/FONT&gt;. I suggest you try switching on &lt;A href="https://docs.microsoft.com/en-us/power-bi/developer/visuals/submission-testing#enable-developer-mode-in-power-bi-desktop" target="_self"&gt;developer mode in Desktop&lt;/A&gt; to test the packaged visual, otherwise you'll never see the results of your changes if loading from a .pbiviz.&lt;/P&gt;
&lt;P&gt;If this works, you'll then need to change the visual's &lt;FONT face="courier new,courier"&gt;guid&lt;/FONT&gt; in &lt;FONT face="courier new,courier"&gt;pbiviz.json&lt;/FONT&gt; to something else, so that it doesn't match the one in AppSource. This way, Power BI Desktop will treat your visual as a separate one and load it.&lt;/P&gt;
&lt;P&gt;Bear in mind that because you're doing this, it will no longer treat the visual as certified because it no longer matches AppSource, so if you need these changes incorporating then I'd suggest &lt;A href="https://appsource.microsoft.com/en-us/product/power-bi-visuals/WA104380832?tab=DetailsAndSupport" target="_self"&gt;contacting the developer of the visual&lt;/A&gt; to see if they can assist with this or accept your changes.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Daniel&lt;/P&gt;</description>
    <pubDate>Mon, 17 May 2021 22:48:00 GMT</pubDate>
    <dc:creator>dm-p</dc:creator>
    <dc:date>2021-05-17T22:48:00Z</dc:date>
    <item>
      <title>Custom Visual Blank Value in Javascript/Typescript</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Custom-Visual-Blank-Value-in-Javascript-Typescript/m-p/1847149#M29456</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My team is editing the pbiviz file for the "KPI Indicator" custom visual to force the visual to the "None" color it the case the data is BLANK. The issue is described below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="gui_v_0-1621275154012.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/515987i744599FB58E15FEE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="gui_v_0-1621275154012.png" alt="gui_v_0-1621275154012.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;https://c&lt;/SPAN&gt;&lt;SPAN&gt;om&lt;/SPAN&gt;&lt;SPAN&gt;mun&lt;/SPAN&gt;&lt;SPAN&gt;ity.powerbi.&lt;/SPAN&gt;&lt;SPAN&gt;com/t5/Desktop/KPI-Indicator-color-for-quot-None-quot-value-does-not-work/m-p/246484&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Our solution was to just update the visual itself in the visual.ts file. The questions we are facing in doing this are the following:&lt;/P&gt;&lt;P&gt;1) How does Power BI pass on a BLANK() value in DAX to the visual? We believe it is the `kpiActual` variable but not sure.&lt;/P&gt;&lt;P&gt;2) How does one evaluate that variable, whatever it is, in javascript?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We've tried:&amp;nbsp;&lt;/P&gt;&lt;P&gt;- if (....kpiActual == null) then {....do the coloring.....}&lt;/P&gt;&lt;P&gt;- if (....kpiActual == "undefined" then {....do the coloring...}&lt;/P&gt;&lt;P&gt;- Setting:&amp;nbsp;&lt;SPAN&gt;diffText = "(" + GetKPIActualDiffFromGoal(kpiActual, kpiGoal, this.kpiCurrentSettings.kpi.bandingCompareType, this.kpiCurrentSettings.kpi.indicateDifferenceAsPercent) + ")"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; - if (.... diffText != "(Blank)") then {.... do the coloring...}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;None of these seem to work! Don't know much Javascript but it is absolutely essential for us to be able to set the color to gray in the case that the KPI Actual Value evaluates to BLANK()&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 May 2021 18:27:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Custom-Visual-Blank-Value-in-Javascript-Typescript/m-p/1847149#M29456</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-05-17T18:27:34Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Visual Blank Value in Javascript/Typescript</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Custom-Visual-Blank-Value-in-Javascript-Typescript/m-p/1847418#M29464</link>
      <description>&lt;P&gt;Hi @Anonymous&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;If you're attempting to modify a visual that is already published in AppSource, Power BI will always look it up and load it from there, based on its &lt;FONT face="courier new,courier"&gt;guid&lt;/FONT&gt;. I suggest you try switching on &lt;A href="https://docs.microsoft.com/en-us/power-bi/developer/visuals/submission-testing#enable-developer-mode-in-power-bi-desktop" target="_self"&gt;developer mode in Desktop&lt;/A&gt; to test the packaged visual, otherwise you'll never see the results of your changes if loading from a .pbiviz.&lt;/P&gt;
&lt;P&gt;If this works, you'll then need to change the visual's &lt;FONT face="courier new,courier"&gt;guid&lt;/FONT&gt; in &lt;FONT face="courier new,courier"&gt;pbiviz.json&lt;/FONT&gt; to something else, so that it doesn't match the one in AppSource. This way, Power BI Desktop will treat your visual as a separate one and load it.&lt;/P&gt;
&lt;P&gt;Bear in mind that because you're doing this, it will no longer treat the visual as certified because it no longer matches AppSource, so if you need these changes incorporating then I'd suggest &lt;A href="https://appsource.microsoft.com/en-us/product/power-bi-visuals/WA104380832?tab=DetailsAndSupport" target="_self"&gt;contacting the developer of the visual&lt;/A&gt; to see if they can assist with this or accept your changes.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Daniel&lt;/P&gt;</description>
      <pubDate>Mon, 17 May 2021 22:48:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Custom-Visual-Blank-Value-in-Javascript-Typescript/m-p/1847418#M29464</guid>
      <dc:creator>dm-p</dc:creator>
      <dc:date>2021-05-17T22:48:00Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Visual Blank Value in Javascript/Typescript</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Custom-Visual-Blank-Value-in-Javascript-Typescript/m-p/1863239#M29591</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;, your response was helpful. We were able to successfully modify the KPI Indicator visual by going to developer mode in the PBI Online Service. Changing the GUID was crucial for it to render. Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 25 May 2021 18:33:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Custom-Visual-Blank-Value-in-Javascript-Typescript/m-p/1863239#M29591</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-05-25T18:33:52Z</dc:date>
    </item>
  </channel>
</rss>

