<?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 Two fields Script QlikSense in Qlik Automate</title>
    <link>https://community.qlik.com/t5/Qlik-Automate/Two-fields-Script-QlikSense/m-p/2511678#M5685</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;In an Invoicing table, I have a Quantity field and in the script I would like to have a field with the quantity Y (current year) and another field the quantity Y-1 from the previous year.&lt;/P&gt;&lt;P&gt;I knwo how it works in set Analysis, but I need both fields in the script to make a calculation.&lt;/P&gt;&lt;P&gt;Could you please give me some suggestions&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&amp;nbsp; in advance&lt;/P&gt;</description>
    <pubDate>Wed, 26 Mar 2025 13:03:23 GMT</pubDate>
    <dc:creator>Amina</dc:creator>
    <dc:date>2025-03-26T13:03:23Z</dc:date>
    <item>
      <title>Two fields Script QlikSense</title>
      <link>https://community.qlik.com/t5/Qlik-Automate/Two-fields-Script-QlikSense/m-p/2511678#M5685</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;In an Invoicing table, I have a Quantity field and in the script I would like to have a field with the quantity Y (current year) and another field the quantity Y-1 from the previous year.&lt;/P&gt;&lt;P&gt;I knwo how it works in set Analysis, but I need both fields in the script to make a calculation.&lt;/P&gt;&lt;P&gt;Could you please give me some suggestions&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&amp;nbsp; in advance&lt;/P&gt;</description>
      <pubDate>Wed, 26 Mar 2025 13:03:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Automate/Two-fields-Script-QlikSense/m-p/2511678#M5685</guid>
      <dc:creator>Amina</dc:creator>
      <dc:date>2025-03-26T13:03:23Z</dc:date>
    </item>
    <item>
      <title>Re: Two fields Script QlikSense</title>
      <link>https://community.qlik.com/t5/Qlik-Automate/Two-fields-Script-QlikSense/m-p/2511689#M5686</link>
      <description>&lt;P&gt;Hi, if there is not too much data, you can load again the invoicing table adding a year to the date&amp;nbsp; and loading the quatity as the new field, something like:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Concatenate (InvoiceTable)
LOAD
  ..., // Fields that doesn't change
  Date(AddYears(InvoiceDate,1)) as InvoiceDate
  Quantity as QuantityLY
Resident InvoiceTable;&lt;/LI-CODE&gt;&lt;P&gt;Note that this will create new rows, so some rows will have value on Quantity field and others on the QuantityLY field, but none of the rows will have values on both fields.&lt;/P&gt;&lt;P&gt;If you want to make calculations maybe you want to load again using a group by to sum the values with the needed granularity.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Mar 2025 13:50:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Automate/Two-fields-Script-QlikSense/m-p/2511689#M5686</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2025-03-26T13:50:36Z</dc:date>
    </item>
    <item>
      <title>Re: Two fields Script QlikSense</title>
      <link>https://community.qlik.com/t5/Qlik-Automate/Two-fields-Script-QlikSense/m-p/2511782#M5691</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/102697"&gt;@Amina&lt;/a&gt;&amp;nbsp;Load current year data first then last year data and join them with Key field so that you will get two columns for same IDs CY_Quantity and LY_Quantity or If you want row wise you can concatenate both loads for CY and LY using flags.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Mar 2025 05:58:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Automate/Two-fields-Script-QlikSense/m-p/2511782#M5691</guid>
      <dc:creator>Bhushan_Mahajan</dc:creator>
      <dc:date>2025-03-27T05:58:54Z</dc:date>
    </item>
  </channel>
</rss>

