<?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: How to intersect employees ID between two years and obtain the amount of cost in the current year in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/How-to-intersect-employees-ID-between-two-years-and-obtain-the/m-p/1924903#M76125</link>
    <description>&lt;P&gt;&amp;nbsp;I'm not sure you need the P({&amp;lt;YEAR={2022}&amp;gt;}). You will get that reduction from your YEAR={2022}. I think you should be able to simplify it to this expression:&lt;/P&gt;
&lt;P&gt;SUM({&amp;lt;YEAR={2022},[Employee ID] = P({&amp;lt;YEAR={2021}&amp;gt;})&amp;gt;}[Cost])&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 30 Apr 2022 21:57:10 GMT</pubDate>
    <dc:creator>Vegar</dc:creator>
    <dc:date>2022-04-30T21:57:10Z</dc:date>
    <item>
      <title>How to intersect employees ID between two years and obtain the amount of cost in the current year</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-intersect-employees-ID-between-two-years-and-obtain-the/m-p/1924652#M76105</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;I have a dataset that contains the list of employees ID and their cost.&lt;/P&gt;
&lt;P&gt;I want to create a calculated measure that intersect employees ID that exist in 2021 and 2022&lt;/P&gt;
&lt;TABLE border="1" width="40.24390243902439%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD height="25px"&gt;2021&lt;/TD&gt;
&lt;TD height="25px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="23.222468588322243%" height="25px"&gt;Employee ID&lt;/TD&gt;
&lt;TD width="17.021433850702152%" height="25px"&gt;Cost&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="23.222468588322243%" height="25px"&gt;1&lt;/TD&gt;
&lt;TD width="17.021433850702152%" height="25px"&gt;10&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="23.222468588322243%" height="25px"&gt;2&lt;/TD&gt;
&lt;TD width="17.021433850702152%" height="25px"&gt;15&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="23.222468588322243%" height="25px"&gt;4&lt;/TD&gt;
&lt;TD width="17.021433850702152%" height="25px"&gt;20&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE border="1" width="40.97049392501871%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="23.349937733499377%" height="25px"&gt;2022&lt;/TD&gt;
&lt;TD width="17.621419676214195%" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="23.349937733499377%" height="25px"&gt;Employee ID&lt;/TD&gt;
&lt;TD width="17.621419676214195%" height="25px"&gt;Cost&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="23.349937733499377%" height="25px"&gt;1&lt;/TD&gt;
&lt;TD width="17.621419676214195%" height="25px"&gt;20&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="23.349937733499377%" height="25px"&gt;2&lt;/TD&gt;
&lt;TD width="17.621419676214195%" height="25px"&gt;30&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="23.349937733499377%" height="25px"&gt;5&lt;/TD&gt;
&lt;TD width="17.621419676214195%" height="25px"&gt;40&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;and extract their total cost ONLY in 2022 (equal to the sum of&amp;nbsp; the cost of Employee ID 1 and 2, 20+30=50).&lt;/P&gt;
&lt;P&gt;Using this set analysis expression,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SUM({&amp;lt;[Employee ID] = P({&amp;lt;YEAR={2022}&amp;gt;})*P({&amp;lt;YEAR={2021}&amp;gt;})&amp;gt;}[Cost])&lt;/P&gt;
&lt;P&gt;I can extract the total cost of employees ID 1 and 2 (75) but not the cost related to 2022 for employees ID 1 and 2 (50 would be the right value).&lt;/P&gt;
&lt;P&gt;Using the next set analysis expression I can't extract the right value:&lt;/P&gt;
&lt;P&gt;SUM({&amp;lt;YEAR={2022}&amp;gt;}{&amp;lt;[Employee ID] = P({&amp;lt;YEAR={2022}&amp;gt;})*P({&amp;lt;YEAR={2021}&amp;gt;})&amp;gt;}[Cost])&lt;/P&gt;
&lt;P&gt;How I can correct the set analysis expression? It exists another way to reach my goal?&lt;/P&gt;
&lt;P&gt;Thank you in advance for the support,&lt;/P&gt;
&lt;P&gt;Fabio.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Apr 2022 15:19:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-intersect-employees-ID-between-two-years-and-obtain-the/m-p/1924652#M76105</guid>
      <dc:creator>fabb995</dc:creator>
      <dc:date>2022-04-29T15:19:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to intersect employees ID between two years and obtain the amount of cost in the current year</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-intersect-employees-ID-between-two-years-and-obtain-the/m-p/1924760#M76114</link>
      <description>&lt;P&gt;Hi, you were close, the syntax to use two filters is separating fields by comma:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;SUM({&amp;lt;YEAR={2022},[Employee ID] = P({&amp;lt;YEAR={2022}&amp;gt;})*P({&amp;lt;YEAR={2021}&amp;gt;})&amp;gt;}[Cost])&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Apr 2022 18:35:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-intersect-employees-ID-between-two-years-and-obtain-the/m-p/1924760#M76114</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2022-04-29T18:35:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to intersect employees ID between two years and obtain the amount of cost in the current year</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-intersect-employees-ID-between-two-years-and-obtain-the/m-p/1924903#M76125</link>
      <description>&lt;P&gt;&amp;nbsp;I'm not sure you need the P({&amp;lt;YEAR={2022}&amp;gt;}). You will get that reduction from your YEAR={2022}. I think you should be able to simplify it to this expression:&lt;/P&gt;
&lt;P&gt;SUM({&amp;lt;YEAR={2022},[Employee ID] = P({&amp;lt;YEAR={2021}&amp;gt;})&amp;gt;}[Cost])&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 30 Apr 2022 21:57:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-intersect-employees-ID-between-two-years-and-obtain-the/m-p/1924903#M76125</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2022-04-30T21:57:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to intersect employees ID between two years and obtain the amount of cost in the current year</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-intersect-employees-ID-between-two-years-and-obtain-the/m-p/1925033#M76133</link>
      <description>&lt;P&gt;Thanks for the answer, but this formula gives me a null value.&lt;/P&gt;
&lt;P&gt;Fabio&lt;/P&gt;</description>
      <pubDate>Mon, 02 May 2022 08:33:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-intersect-employees-ID-between-two-years-and-obtain-the/m-p/1925033#M76133</guid>
      <dc:creator>fabb995</dc:creator>
      <dc:date>2022-05-02T08:33:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to intersect employees ID between two years and obtain the amount of cost in the current year</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-intersect-employees-ID-between-two-years-and-obtain-the/m-p/1925034#M76134</link>
      <description>&lt;P&gt;Thank you, this is the right formula.&lt;/P&gt;
&lt;P&gt;Fabio&lt;/P&gt;</description>
      <pubDate>Mon, 02 May 2022 08:33:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-intersect-employees-ID-between-two-years-and-obtain-the/m-p/1925034#M76134</guid>
      <dc:creator>fabb995</dc:creator>
      <dc:date>2022-05-02T08:33:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to intersect employees ID between two years and obtain the amount of cost in the current year</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-intersect-employees-ID-between-two-years-and-obtain-the/m-p/1925036#M76135</link>
      <description>&lt;P&gt;Hi, it worked for me, sample attached.&lt;/P&gt;
&lt;P&gt;Anyway, Vegar answer is better, I just focused on the syntax.&lt;/P&gt;</description>
      <pubDate>Mon, 02 May 2022 08:40:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-intersect-employees-ID-between-two-years-and-obtain-the/m-p/1925036#M76135</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2022-05-02T08:40:33Z</dc:date>
    </item>
  </channel>
</rss>

