<?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: Formula Decipher Needed in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Formula-Decipher-Needed/m-p/1816967#M1213086</link>
    <description>&lt;P&gt;Thank you so much. I have not used the ad hoc variables before so they were throwing me through a loop a bit. Thank you.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 22 Jun 2021 11:54:33 GMT</pubDate>
    <dc:creator>JustinRamsey</dc:creator>
    <dc:date>2021-06-22T11:54:33Z</dc:date>
    <item>
      <title>Formula Decipher Needed</title>
      <link>https://community.qlik.com/t5/QlikView/Formula-Decipher-Needed/m-p/1816722#M1213068</link>
      <description>&lt;P&gt;I have been tasked with supporting a large number of applications developed by a colleague that is&amp;nbsp; no longer with the company. He was def. the senior developer for all Qlik apps so there has been a steep learning curve to decipher some of his formulas in apps.&amp;nbsp;&lt;/P&gt;&lt;P&gt;One I am working with now thats "supposed" to equal a value from a different report but isnt is below. I cannot make sense of what the set analysis are doing exactly. Any guidance would be appreciated. Thanks in advance!&amp;nbsp;&lt;/P&gt;&lt;P&gt;num(sum( {$&amp;lt; VBAP.ERDAT_NO_DELTA = {"&amp;lt;$(=SELECTION_CAL.DATUM_NUM)"}, VBAP.FKDAT_FUER_AUFTRAGSBESTAND = {"&amp;gt;$(=SELECTION_CAL.DATUM_NUM)"} &amp;gt;}&amp;nbsp; VBAP.NETWR_EFF_LOCAL), '#.##0,00 loc'))&lt;/P&gt;&lt;P&gt;Field Names and rough definitions below&lt;/P&gt;&lt;P&gt;VBAP.FKDAT_FUER_AUFTRAGSBESTAND= Order Backlog Billing Date&lt;/P&gt;&lt;P&gt;VBAP.ERDAT_NO_DELTA= fixed order date&lt;/P&gt;&lt;P&gt;VBAP.NETWR_EFF_LOCAL= Value in local currency&lt;/P&gt;&lt;P&gt;SELECTION_CAL.DATUM_Num is created by the following script :&lt;/P&gt;&lt;P&gt;LET vSeletionStart = num(makedate(2015,1,1));&lt;BR /&gt;LET vSelectionEnde = num(today());&lt;/P&gt;&lt;P&gt;LET vAnzahlTage = $(vSelectionEnde) - $(vSeletionStart) + 1;&lt;/P&gt;&lt;P&gt;LOAD&lt;BR /&gt;recno() + $(vSeletionStart) - 1 as SELECTION_CAL.DATUM_NUM&lt;BR /&gt;autogenerate $(vAnzahlTage);&lt;/P&gt;&lt;P&gt;num(sum( {$&amp;lt; VBAP.ERDAT_NO_DELTA = {"&amp;lt;$(=SELECTION_CAL.DATUM_NUM)"}, VBAP.FKDAT_FUER_AUFTRAGSBESTAND = {"&amp;gt;$(=SELECTION_CAL.DATUM_NUM)"} &amp;gt;}&amp;nbsp; VBAP.NETWR_EFF_LOCAL), '#.##0,00 loc'))&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jun 2021 19:12:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formula-Decipher-Needed/m-p/1816722#M1213068</guid>
      <dc:creator>JustinRamsey</dc:creator>
      <dc:date>2021-06-21T19:12:17Z</dc:date>
    </item>
    <item>
      <title>Re: Formula Decipher Needed</title>
      <link>https://community.qlik.com/t5/QlikView/Formula-Decipher-Needed/m-p/1816803#M1213071</link>
      <description>&lt;P&gt;Hi Justin,&lt;/P&gt;&lt;P&gt;he is using ad-hoc variables in the statement, i.e. variables that are generated/filled depending on current selections. Here the VBAP.ERDAT_NO_DELTA is smaller than the current value of SELECTION_CAL.DATUM_NUM and the VBAP.FKDAT_FUER_AUFTRAGSBESTAND is larger than the current value of SELECTION_CAL.DATUM_NUM. So the result of the sum will change with every selection made in the date fields.&lt;/P&gt;&lt;P&gt;Just as an example of how ad-hoc variables in set analysis statements work, this would give you the cumulative data of the previous year up to the current/ maximum selected month:&lt;/P&gt;&lt;P&gt;&amp;lt; Year = { $(= max(Year)-1)}, MonthNo = {"&amp;lt;=$(=max(MonthNo))" }, Month=, Date= &amp;gt;&lt;/P&gt;&lt;P&gt;The statement has to use " and you can use all modifiers like '&amp;lt;, &amp;gt;, &amp;lt;=, &amp;gt;=' before the variable that starts with '$('.&lt;/P&gt;&lt;P&gt;There are some good tutorials about set analysis floating around the forums - they are worthwhile to check out, since SA is a really powerful tool when used correctly.&lt;/P&gt;&lt;P&gt;Good luck!&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jun 2021 22:15:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formula-Decipher-Needed/m-p/1816803#M1213071</guid>
      <dc:creator>lenka_kruse</dc:creator>
      <dc:date>2021-06-21T22:15:23Z</dc:date>
    </item>
    <item>
      <title>Re: Formula Decipher Needed</title>
      <link>https://community.qlik.com/t5/QlikView/Formula-Decipher-Needed/m-p/1816967#M1213086</link>
      <description>&lt;P&gt;Thank you so much. I have not used the ad hoc variables before so they were throwing me through a loop a bit. Thank you.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jun 2021 11:54:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formula-Decipher-Needed/m-p/1816967#M1213086</guid>
      <dc:creator>JustinRamsey</dc:creator>
      <dc:date>2021-06-22T11:54:33Z</dc:date>
    </item>
  </channel>
</rss>

