<?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: Save a selection in a variable in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Save-a-selection-in-a-variable/m-p/1836280#M69092</link>
    <description>&lt;LI-SPOILER&gt;Hi Angel&lt;BR /&gt;You can do it in the app, if you click on Edit Sheet, on the bottom right you will see a box showing x, y. If you click on the bix, it will show you all variables and you can create new variable there using formula.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Hope it serves the purpose.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thanks&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Khushi&lt;/LI-SPOILER&gt;</description>
    <pubDate>Wed, 15 Sep 2021 09:38:49 GMT</pubDate>
    <dc:creator>Khushi_K</dc:creator>
    <dc:date>2021-09-15T09:38:49Z</dc:date>
    <item>
      <title>Save a selection in a variable</title>
      <link>https://community.qlik.com/t5/App-Development/Save-a-selection-in-a-variable/m-p/1835908#M69061</link>
      <description>&lt;P&gt;Hi all. Thanks a lot to be there.&lt;/P&gt;&lt;P&gt;I do not have much experience. If this question is resolved in another thread, I am very sorry. I have tried to locate something before writing to you.&lt;/P&gt;&lt;P&gt;Let me explain my question:&lt;/P&gt;&lt;P&gt;I'm creating a measure. From a functional point of view the idea is to calculate all the employees who have been working on the company during the WHOLE calculation period.&amp;nbsp;To solve this problem, I am going to calculate the employees hired at the beginning of the period, I am going to make the intersection with the employees who are still hired at the end of the period and from this set I am going to remove the employees who were off at least one day in the period.&lt;/P&gt;&lt;P&gt;Set of active employees at first day of the year of period calculation&lt;BR /&gt;&amp;lt;EmployeeID = P ({&amp;lt;FACTTYPE=,IDCalendar={'$(=$(vdateFirstDayInYear))'},EmploymentStatusID={'1'}&amp;gt;} EmployeeID ) &amp;gt;&lt;/P&gt;&lt;P&gt;Set of active employees at the end of period calculation&lt;BR /&gt;&amp;lt;EmployeeID = P ({&amp;lt;FACTTYPE=,IDCalendar={'$(=$(vdateMaxDayInPeriod))'},EmploymentStatusID={'1'}&amp;gt;} EmployeeID ) &amp;gt;&lt;/P&gt;&lt;P&gt;Set of employees in TERMINATION in the period of calculation&lt;BR /&gt;&amp;lt;EmployeeID = P ({&amp;lt;FACTTYPE={'EXITS'}, IDCalendar={"&amp;gt;=$(=$(vdateFirstDayInYear)) &amp;lt;=$(=$(vdateMaxDayInPeriod))"}&amp;gt; } EmployeeID ) &amp;gt;&lt;/P&gt;&lt;P&gt;Here is my question:&lt;/P&gt;&lt;P&gt;In the measure's formule, I'd like to have something like:&lt;/P&gt;&lt;P&gt;Count( {((GroupHiredStartPeriod) * (GroupHiredEndPeriod)) - GroupTerminationInPeriod } Distinct EmployeeID )&lt;/P&gt;&lt;P&gt;Just to test, in the application I have tried to create a variable&amp;nbsp;GroupHiredStartPeriod and in the formule section, include the code:&lt;/P&gt;&lt;P&gt;&amp;lt;EmployeeID = P ({&amp;lt;FACTTYPE=,IDCalendar={'$(=$(vdateFirstDayInYear))'},EmploymentStatusID={'1'}&amp;gt;} EmployeeID ) &amp;gt;&lt;/P&gt;&lt;P&gt;It doesn't work...&lt;/P&gt;&lt;P&gt;Then, my first question is how I must create a variable or any other element in QlikSense (perhaps a Group?????), to be reused in any measure.&lt;/P&gt;&lt;P&gt;My second question is the following: I don't know if we can do that directly in the Qlik App or it's absolutely mandatory to pass throug an script to load the definition of these variables. If so, could you please provide an example for creating one of above variable?&lt;/P&gt;&lt;P&gt;I'd like to thank you in advance your help and support.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have a nice week.&lt;/P&gt;&lt;P&gt;Ángel.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Sep 2021 08:14:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Save-a-selection-in-a-variable/m-p/1835908#M69061</guid>
      <dc:creator>angelmsQlik</dc:creator>
      <dc:date>2021-09-14T08:14:20Z</dc:date>
    </item>
    <item>
      <title>Re: Save a selection in a variable</title>
      <link>https://community.qlik.com/t5/App-Development/Save-a-selection-in-a-variable/m-p/1836280#M69092</link>
      <description>&lt;LI-SPOILER&gt;Hi Angel&lt;BR /&gt;You can do it in the app, if you click on Edit Sheet, on the bottom right you will see a box showing x, y. If you click on the bix, it will show you all variables and you can create new variable there using formula.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Hope it serves the purpose.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thanks&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Khushi&lt;/LI-SPOILER&gt;</description>
      <pubDate>Wed, 15 Sep 2021 09:38:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Save-a-selection-in-a-variable/m-p/1836280#M69092</guid>
      <dc:creator>Khushi_K</dc:creator>
      <dc:date>2021-09-15T09:38:49Z</dc:date>
    </item>
  </channel>
</rss>

