<?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 Enable or Disable Expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Enable-or-Disable-Expression/m-p/194714#M505312</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank's Tim.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 23 Sep 2009 02:29:54 GMT</pubDate>
    <dc:creator />
    <dc:date>2009-09-23T02:29:54Z</dc:date>
    <item>
      <title>Enable or Disable Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Enable-or-Disable-Expression/m-p/194712#M505310</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;I have created the follow script:&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;B&gt;SECTION&lt;/B&gt; ACCESS;&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;B&gt;LOAD&lt;/B&gt; * &lt;B&gt;INLINE&lt;/B&gt; [&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;ACCESS, USERID&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;ADMIN, ADMIN&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;ADMIN, BETE&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;];&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;B&gt;SECTION&lt;/B&gt; APPLICATION;&lt;/P&gt;&lt;P style="font-style: italic; margin: 0cm 0cm 0pt"&gt;OPERADOR:&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;B&gt;LOAD&lt;/B&gt; * &lt;B&gt;INLINE&lt;/B&gt; [&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;CodEmp , USERID&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;1 , ADMIN&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;2 , ADMIN&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;3 , ADMIN&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;4 , BETE&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;5 , BETE&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;];&lt;/P&gt;&lt;P style="font-style: italic; margin: 0cm 0cm 0pt"&gt;Produto:&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;B&gt;LOAD&lt;/B&gt; * &lt;B&gt;INLINE&lt;/B&gt; [&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;CodProd , DescProd&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;1 , PROD1&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;2 , PROD2&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;3 , PROD3&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;4 , PROD4&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;5 , PROD5&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;6 , PROD6&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;];&lt;/P&gt;&lt;P style="font-style: italic; margin: 0cm 0cm 0pt"&gt;Empresa:&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;B&gt;LOAD&lt;/B&gt; * &lt;B&gt;INLINE&lt;/B&gt; [&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;CodEmp , DescEmp&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;1 , EMPRESA1&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;2 , EMPRESA2&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;3 , EMPRESA3&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;4 , EMPRESA4&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;5 , EMPRESA5&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;];&lt;/P&gt;&lt;P style="font-style: italic; margin: 0cm 0cm 0pt"&gt;ProdQtd:&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;B&gt;LOAD&lt;/B&gt; * &lt;B&gt;INLINE&lt;/B&gt; [&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;CodEmp , CodProd , DtRefer , Quantidade&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;1 , 1 , 200801 , 30&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;2 , 2 , 200801 , 100&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;3 , 3 , 200801 , 50&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;1 , 4 , 200802 , 65&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;2 , 5 , 200802 , 200&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;3 , 1 , 200802 , 32&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;1 , 2 , 200803 , 45&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;2 , 3 , 200803 , 61&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;3 , 4 , 200803 , 80&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;1 , 5 , 200804 , 93&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;2 , 1 , 200804 , 26&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;3 , 2 , 200804 , 150&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;1 , 3 , 200805 , 200&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;2 , 4 , 200805 , 300&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;3 , 5 , 200805 , 243&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;1 , 1 , 200806 , 65&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;2 , 2 , 200806 , 58&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;3 , 3 , 200806 , 99&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;4 , 3 , 200801 , 10&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;4 , 5 , 200801 , 40&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;5 , 3 , 200801 , 50&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;5 , 5 , 200802 , 200&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;];&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;And the follow macro is executed when I open the QVW:&lt;/P&gt;&lt;P style="font-weight: bold; margin: 0cm 0cm 0pt"&gt;&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;B&gt;SUB&lt;/B&gt; Desabilitar&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;B&gt;SET&lt;/B&gt; grafico = ActiveDocument.GetSheetObject("CH02")&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;B&gt;SET&lt;/B&gt; propriedade = grafico.GetProperties&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;B&gt;SET&lt;/B&gt; expressao = propriedade.Expressions&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;qtdexpr = expressao.Count - 1&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;B&gt;FOR&lt;/B&gt; count = 0 to qtdexpr&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;expr = expressao.Item(count).Item(0).Data.ExpressionData&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;expr.Enable = &lt;B&gt;FALSE&lt;/B&gt;&lt;/P&gt;&lt;P style="font-weight: bold; margin: 0cm 0cm 0pt"&gt;NEXT&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;grafico.SetProperties propriedade&lt;/P&gt;&lt;P style="font-weight: bold; margin: 0cm 0cm 0pt"&gt;END SUB&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;And a graphic was created with the dimensions: DtRefer from table "ProdQtd" . And six expressions too with the follow dimensions:&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;Rótulo = ONLY(IF(CodProd = X, DescProd))&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;Expressão = SUM(IF(CodProd = X, Quantidade))&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;The value of X ranges from 1 to 6.&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;I want to chage this macro to disable the expressions whose sum of the amount of product is equal to zero or null.&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;Is there any command that I can use to get the result of expression?&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;Can somebody help, please?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Sep 2009 21:04:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Enable-or-Disable-Expression/m-p/194712#M505310</guid>
      <dc:creator />
      <dc:date>2009-09-22T21:04:16Z</dc:date>
    </item>
    <item>
      <title>Enable or Disable Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Enable-or-Disable-Expression/m-p/194713#M505311</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can examine the contents of sheet objects by specifying the object and using row and column to identify a "cell" similar to what you might do with a spreadsheet macro. Here's an example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;set obj_total=ActiveDocument.Sheets("SH04").SheetObjects("CH11").GetCell(1,8)&lt;BR /&gt;'that GetCell argument is row,column&lt;BR /&gt;If Err.number&amp;lt;&amp;gt;0 then&lt;BR /&gt; msgbox("Error getting TOTAL value")&lt;BR /&gt; exit sub&lt;BR /&gt; end if&lt;BR /&gt;'remove editing characters and convert text to a number&lt;BR /&gt;current_value=CDbl(replace(obj_total.text,"%",""))&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;The example shows a method for removing a % character. You don't need to do that if your cell contains a number and nothing else.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Sep 2009 00:13:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Enable-or-Disable-Expression/m-p/194713#M505311</guid>
      <dc:creator />
      <dc:date>2009-09-23T00:13:51Z</dc:date>
    </item>
    <item>
      <title>Enable or Disable Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Enable-or-Disable-Expression/m-p/194714#M505312</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank's Tim.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Sep 2009 02:29:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Enable-or-Disable-Expression/m-p/194714#M505312</guid>
      <dc:creator />
      <dc:date>2009-09-23T02:29:54Z</dc:date>
    </item>
  </channel>
</rss>

