<?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: Trigger macro when new data point greater than a certain value in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Trigger-macro-when-new-data-point-greater-than-a-certain-value/m-p/358843#M133165</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; ok.. i kind of got it... &lt;/P&gt;&lt;P&gt;so, I am assuming that every new data point that comes in, is calculated for the latest newly added dimension value. &lt;/P&gt;&lt;P&gt;So if this reference dimension is a date, then you can always use &amp;lt; Dimension = {$(=Max(reference date&lt;EM&gt; or year or month&lt;/EM&gt;)}&amp;gt; in a Set Expression and put that in the definition of that variable OR if that dimension is not numeric or date type, then u may need to create an additional field in the script, using RowNo Or RecNo, and then use this field in a FirstSortOrder function to get the latest loaded dimension value. Then use that within the Set Expression... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am sure all this is too theoretical unless we work on an example file.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 18 May 2012 14:21:12 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-05-18T14:21:12Z</dc:date>
    <item>
      <title>Trigger macro when new data point greater than a certain value</title>
      <link>https://community.qlik.com/t5/QlikView/Trigger-macro-when-new-data-point-greater-than-a-certain-value/m-p/358840#M133162</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi, I've been working around with triggers and I have run into a problem. Here's the situation: When a new point of data is added, if that value is greater than a certain value then I want to trigger a macro. I also need to use the value (int) of that data point in the script.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 May 2012 13:06:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trigger-macro-when-new-data-point-greater-than-a-certain-value/m-p/358840#M133162</guid>
      <dc:creator />
      <dc:date>2012-05-18T13:06:46Z</dc:date>
    </item>
    <item>
      <title>Trigger macro when new data point greater than a certain value</title>
      <link>https://community.qlik.com/t5/QlikView/Trigger-macro-when-new-data-point-greater-than-a-certain-value/m-p/358841#M133163</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;when you say, a new data point is added, how exactly does it get added.&lt;/P&gt;&lt;P&gt;I presume, it will always happen after a reload or a partial reload, right? So then you can always associate your macro to the OnPostReload trigger of your document. The data point could be stored in a variable and then its value could be compared&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or in case if its happening thru a slider bar, then you can associate to a variable change trigger.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;would be nice if you can share a sample application.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 May 2012 13:35:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trigger-macro-when-new-data-point-greater-than-a-certain-value/m-p/358841#M133163</guid>
      <dc:creator />
      <dc:date>2012-05-18T13:35:39Z</dc:date>
    </item>
    <item>
      <title>Re: Trigger macro when new data point greater than a certain value</title>
      <link>https://community.qlik.com/t5/QlikView/Trigger-macro-when-new-data-point-greater-than-a-certain-value/m-p/358842#M133164</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What I mean by a new data point being added is that I just need it to, OnPostReload, check each new point. I was thinking for each point, set the variable to the field value(Actually, in this case it's an expression including field values) then check in a macro vbscript if it's out of bounds and then perform the actions required (in this case email, but I have that done) if it is. I am having trouble giving the variable a value of an evaluated expression. If I can do that and make sure to check every new point on a reload, I'll be good to go. Edit: Added file&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 May 2012 13:57:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trigger-macro-when-new-data-point-greater-than-a-certain-value/m-p/358842#M133164</guid>
      <dc:creator />
      <dc:date>2012-05-18T13:57:16Z</dc:date>
    </item>
    <item>
      <title>Re: Trigger macro when new data point greater than a certain value</title>
      <link>https://community.qlik.com/t5/QlikView/Trigger-macro-when-new-data-point-greater-than-a-certain-value/m-p/358843#M133165</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; ok.. i kind of got it... &lt;/P&gt;&lt;P&gt;so, I am assuming that every new data point that comes in, is calculated for the latest newly added dimension value. &lt;/P&gt;&lt;P&gt;So if this reference dimension is a date, then you can always use &amp;lt; Dimension = {$(=Max(reference date&lt;EM&gt; or year or month&lt;/EM&gt;)}&amp;gt; in a Set Expression and put that in the definition of that variable OR if that dimension is not numeric or date type, then u may need to create an additional field in the script, using RowNo Or RecNo, and then use this field in a FirstSortOrder function to get the latest loaded dimension value. Then use that within the Set Expression... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am sure all this is too theoretical unless we work on an example file.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 May 2012 14:21:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trigger-macro-when-new-data-point-greater-than-a-certain-value/m-p/358843#M133165</guid>
      <dc:creator />
      <dc:date>2012-05-18T14:21:12Z</dc:date>
    </item>
    <item>
      <title>Re: Trigger macro when new data point greater than a certain value</title>
      <link>https://community.qlik.com/t5/QlikView/Trigger-macro-when-new-data-point-greater-than-a-certain-value/m-p/358844#M133166</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How do I use the variable in my vb script (As a result of the expression it was set to)? I've done "T1 = ActiveDocument.Variables("NextPoint").GetContent().String" but that obviously just gets me a string (the expression) and removing the ".String" makes it not work. If you can tell me how to do that I may be able to find out how to do the rest.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 May 2012 15:54:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trigger-macro-when-new-data-point-greater-than-a-certain-value/m-p/358844#M133166</guid>
      <dc:creator />
      <dc:date>2012-05-18T15:54:20Z</dc:date>
    </item>
    <item>
      <title>Re: Trigger macro when new data point greater than a certain value</title>
      <link>https://community.qlik.com/t5/QlikView/Trigger-macro-when-new-data-point-greater-than-a-certain-value/m-p/358845#M133167</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; what is the definition of the variable. Try putting an "equal to" sign preceeding the variable definition. e.g. if your variable definition as seen in variable overview&amp;nbsp; is "Max(DimensionName)" then put it as "=Max(DimensionName)"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 May 2012 16:07:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trigger-macro-when-new-data-point-greater-than-a-certain-value/m-p/358845#M133167</guid>
      <dc:creator />
      <dc:date>2012-05-18T16:07:12Z</dc:date>
    </item>
    <item>
      <title>Re: Trigger macro when new data point greater than a certain value</title>
      <link>https://community.qlik.com/t5/QlikView/Trigger-macro-when-new-data-point-greater-than-a-certain-value/m-p/358846#M133168</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Okay, thanks. That works but there's 1 more question I have. In order to gain access to all points added on reload (say if it's reloaded daily) would be to just make a variable&amp;nbsp; ={$&amp;lt;Date = {TODAY}&amp;gt;}&amp;nbsp; ? Thanks a lot for all your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 May 2012 17:21:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trigger-macro-when-new-data-point-greater-than-a-certain-value/m-p/358846#M133168</guid>
      <dc:creator />
      <dc:date>2012-05-18T17:21:42Z</dc:date>
    </item>
    <item>
      <title>Re: Trigger macro when new data point greater than a certain value</title>
      <link>https://community.qlik.com/t5/QlikView/Trigger-macro-when-new-data-point-greater-than-a-certain-value/m-p/358847#M133169</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Actually when you will add that set expression, then the range of values that the aggregation is going to consider will be limited to those data points that are loaded today &lt;/P&gt;&lt;P&gt;So, lets say 3 data points got in today. So as per your original requirement, if any of the data point is beyond your specified range, then it should trigger a macro. &lt;/P&gt;&lt;P&gt;So, what you will need to do is, first use your SET expression to limit the data range to the 3 points loaded today, and then get the maximum of the three. If the maximum of the three is greater than your specified limit then trigger your next code. &lt;/P&gt;&lt;P&gt;So, essentially your variable should find out the max of the three values loaded today&lt;/P&gt;&lt;P&gt;Did it make sense?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 May 2012 17:45:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trigger-macro-when-new-data-point-greater-than-a-certain-value/m-p/358847#M133169</guid>
      <dc:creator />
      <dc:date>2012-05-18T17:45:04Z</dc:date>
    </item>
  </channel>
</rss>

