<?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: Hide gauge indicator/needle when expression is null. in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Hide-gauge-indicator-needle-when-expression-is-null/m-p/459207#M570089</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use the "Calculation Condition" found on the "General" tab of the chart properties, this will show a text instead of the Gauge ( defaults to "Calculation condition unfulfilled" but that can be changed under "Error Messages..." button on the same tab.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 02 Oct 2012 11:49:45 GMT</pubDate>
    <dc:creator>kji</dc:creator>
    <dc:date>2012-10-02T11:49:45Z</dc:date>
    <item>
      <title>Hide gauge indicator/needle when expression is null.</title>
      <link>https://community.qlik.com/t5/QlikView/Hide-gauge-indicator-needle-when-expression-is-null/m-p/459204#M570086</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to hide/show the indicator of a gauge chart depending on what the expression calculation results in. The min val of the gauge is 0 (as in 0 %) and max val is 100 (as in 100 %). The gauge chart shows how many activities of a certain type that started in time.&lt;/P&gt;&lt;P&gt;If 3 of 4 activites started in time the indicator will point at 75 %.&lt;/P&gt;&lt;P&gt;If 0 of 4 activities started in time the indicator will point at 0 %.&lt;/P&gt;&lt;P&gt;But if there are no activities of the certain type, i.e. 0 of 0 activities started in time, I want to hide the indicator since it would be incorrect to say that 0 activities started in time. The result is actually null.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I use a macro to hide/show the indicator:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13491731749984090" jivemacro_uid="_13491731749984090"&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; set chart = ActiveDocument.GetSheetObject("CH616")&lt;/P&gt;&lt;P&gt; set props = chart.GetProperties&lt;/P&gt;&lt;P&gt; set gaugeSettings = props.ChartProperties.GaugeSettings&lt;/P&gt;&lt;P&gt; gaugeSettings.GaugeShowIndicator = false&lt;/P&gt;&lt;P&gt; chart.SetProperties props&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is that I can't find a way of reading the expression result in the macro. I should need something like the bold text below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if &lt;STRONG&gt;&lt;EM&gt;chart.getexpression("ActivitiesStartedInTime").value &lt;/EM&gt;&lt;/STRONG&gt;= null() then&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gaugeSettings.GaugeShowIndicator = false&lt;/P&gt;&lt;P&gt;else&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gaugeSettings.GaugeShowIndicator = true&lt;/P&gt;&lt;P&gt;end if&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way of doing this or is it possible to achieve what I want with another approach?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Oct 2012 10:30:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Hide-gauge-indicator-needle-when-expression-is-null/m-p/459204#M570086</guid>
      <dc:creator />
      <dc:date>2012-10-02T10:30:56Z</dc:date>
    </item>
    <item>
      <title>Re: Hide gauge indicator/needle when expression is null.</title>
      <link>https://community.qlik.com/t5/QlikView/Hide-gauge-indicator-needle-when-expression-is-null/m-p/459205#M570087</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is better to use the conditional show feature to selectivly show or hide a sheet object. This works equally in all clients, whereas macros are client sensitive; and the conditional show operates automatically without needing to be triggered.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Go to Properties | Layout for the guage. Select Conditional and enter the following expression in the Conditional Show box:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=If(IsNull(&lt;EM&gt;&amp;lt;your guage expression here&amp;gt;&lt;/EM&gt;), 0, 1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Oct 2012 11:00:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Hide-gauge-indicator-needle-when-expression-is-null/m-p/459205#M570087</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2012-10-02T11:00:15Z</dc:date>
    </item>
    <item>
      <title>Re: Hide gauge indicator/needle when expression is null.</title>
      <link>https://community.qlik.com/t5/QlikView/Hide-gauge-indicator-needle-when-expression-is-null/m-p/459206#M570088</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The conditional show on the entire gauge object works fine - thanks! - but it doesn't really fulfill what I want to achieve. The end users would probably be quite confused when the entire gauge is missing. I don't think they would interpret that as 0 actions, but rather as "something has gone wrong here".&lt;/P&gt;&lt;P&gt;I wish there was a conditional show on the indicator itself...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, if I add a text object that is shown when the gauge is hidden I could inform the user about the 0 actions there. If I don't get any other suggestions on how to solve this problem I will likely go for that solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks Jonathan!&lt;/P&gt;&lt;P&gt;Sara&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Oct 2012 11:24:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Hide-gauge-indicator-needle-when-expression-is-null/m-p/459206#M570088</guid>
      <dc:creator />
      <dc:date>2012-10-02T11:24:46Z</dc:date>
    </item>
    <item>
      <title>Re: Hide gauge indicator/needle when expression is null.</title>
      <link>https://community.qlik.com/t5/QlikView/Hide-gauge-indicator-needle-when-expression-is-null/m-p/459207#M570089</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use the "Calculation Condition" found on the "General" tab of the chart properties, this will show a text instead of the Gauge ( defaults to "Calculation condition unfulfilled" but that can be changed under "Error Messages..." button on the same tab.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Oct 2012 11:49:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Hide-gauge-indicator-needle-when-expression-is-null/m-p/459207#M570089</guid>
      <dc:creator>kji</dc:creator>
      <dc:date>2012-10-02T11:49:45Z</dc:date>
    </item>
    <item>
      <title>Re: Hide gauge indicator/needle when expression is null.</title>
      <link>https://community.qlik.com/t5/QlikView/Hide-gauge-indicator-needle-when-expression-is-null/m-p/459208#M570090</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Of course! Thanks for your comment, Johan! The calculation condition solution is much more stylish.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Oct 2012 12:17:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Hide-gauge-indicator-needle-when-expression-is-null/m-p/459208#M570090</guid>
      <dc:creator />
      <dc:date>2012-10-02T12:17:07Z</dc:date>
    </item>
  </channel>
</rss>

