<?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: Compare 2 Values in different rows in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Compare-2-Values-in-different-rows/m-p/1806634#M65611</link>
    <description>&lt;P class="lia-indent-padding-left-30px"&gt;// Load the data&lt;BR /&gt;StockData:&lt;BR /&gt;Load * Inline [&lt;BR /&gt;Price, Text, MaterialNumber&lt;BR /&gt;10000, t-shirt, 93849&lt;BR /&gt;20000, pants, 93002&lt;BR /&gt;10000, t-shirt, 88493&lt;BR /&gt;30200, pants, 98390&lt;BR /&gt;20000, pants, 18837&lt;BR /&gt;23000, shirts, 93982&lt;BR /&gt;22000, skirts, 39820&lt;BR /&gt;22010, skirts, 3921983&lt;BR /&gt;];&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;// Go through data to find material numbers where the price and text are identical&lt;BR /&gt;Join&lt;BR /&gt;Load&lt;BR /&gt;Price, Text, MaterialNumber,&lt;BR /&gt;IF (Price = Previous(Price) and Text = Previous(Text), 'Yes', 'No') as MatchFound&lt;BR /&gt;resident StockData&lt;BR /&gt;order by Price, Text, MaterialNumber&lt;/P&gt;&lt;P&gt;Yields these results:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Dalton_Ruer_0-1620654166878.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/54634iE4C095483581173E/image-size/large?v=v2&amp;amp;px=999" role="button" title="Dalton_Ruer_0-1620654166878.png" alt="Dalton_Ruer_0-1620654166878.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If it's a count you are looking for you can simply change Yes and No to 1 and 0. Or use Dual('Yes', 1), Dual('No', 0)&lt;/P&gt;&lt;P&gt;and then you could SUM the duplicatefound field for the count.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 10 May 2021 13:43:56 GMT</pubDate>
    <dc:creator>Dalton_Ruer</dc:creator>
    <dc:date>2021-05-10T13:43:56Z</dc:date>
    <item>
      <title>Compare 2 Values in different rows</title>
      <link>https://community.qlik.com/t5/App-Development/Compare-2-Values-in-different-rows/m-p/1806512#M65597</link>
      <description>&lt;P&gt;Hello Together,&amp;nbsp;&lt;/P&gt;&lt;P&gt;currently I compare 2 Values from different rows.&amp;nbsp;&lt;BR /&gt;This works fine.&lt;/P&gt;&lt;P&gt;But now I want just to count the Material Number if the Text and the Price are equal to each other.&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example in the below table only count Text = T-Shirt with Price 10,00€.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Daniel1908_0-1620636522405.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/54601iA7E5EA04D2945DEC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Daniel1908_0-1620636522405.png" alt="Daniel1908_0-1620636522405.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I am using the below in the script:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Left Join (Data)&lt;/P&gt;&lt;P&gt;Load&lt;BR /&gt;Text,&lt;BR /&gt;&lt;BR /&gt;If(Count(Text)&amp;gt;1,1) as CountText&lt;/P&gt;&lt;P&gt;Resident Data&lt;/P&gt;&lt;P&gt;Group by Text;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Left Join (Data)&lt;/P&gt;&lt;P&gt;Load&lt;BR /&gt;"Price",&lt;BR /&gt;&lt;BR /&gt;If(Count("Price")&amp;gt;1,1) as CountPrice&lt;/P&gt;&lt;P&gt;Resident Data&lt;/P&gt;&lt;P&gt;Group by "Price";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 May 2021 08:52:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Compare-2-Values-in-different-rows/m-p/1806512#M65597</guid>
      <dc:creator>Daniel1908</dc:creator>
      <dc:date>2021-05-10T08:52:35Z</dc:date>
    </item>
    <item>
      <title>Re: Compare 2 Values in different rows</title>
      <link>https://community.qlik.com/t5/App-Development/Compare-2-Values-in-different-rows/m-p/1806634#M65611</link>
      <description>&lt;P class="lia-indent-padding-left-30px"&gt;// Load the data&lt;BR /&gt;StockData:&lt;BR /&gt;Load * Inline [&lt;BR /&gt;Price, Text, MaterialNumber&lt;BR /&gt;10000, t-shirt, 93849&lt;BR /&gt;20000, pants, 93002&lt;BR /&gt;10000, t-shirt, 88493&lt;BR /&gt;30200, pants, 98390&lt;BR /&gt;20000, pants, 18837&lt;BR /&gt;23000, shirts, 93982&lt;BR /&gt;22000, skirts, 39820&lt;BR /&gt;22010, skirts, 3921983&lt;BR /&gt;];&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;// Go through data to find material numbers where the price and text are identical&lt;BR /&gt;Join&lt;BR /&gt;Load&lt;BR /&gt;Price, Text, MaterialNumber,&lt;BR /&gt;IF (Price = Previous(Price) and Text = Previous(Text), 'Yes', 'No') as MatchFound&lt;BR /&gt;resident StockData&lt;BR /&gt;order by Price, Text, MaterialNumber&lt;/P&gt;&lt;P&gt;Yields these results:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Dalton_Ruer_0-1620654166878.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/54634iE4C095483581173E/image-size/large?v=v2&amp;amp;px=999" role="button" title="Dalton_Ruer_0-1620654166878.png" alt="Dalton_Ruer_0-1620654166878.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If it's a count you are looking for you can simply change Yes and No to 1 and 0. Or use Dual('Yes', 1), Dual('No', 0)&lt;/P&gt;&lt;P&gt;and then you could SUM the duplicatefound field for the count.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 May 2021 13:43:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Compare-2-Values-in-different-rows/m-p/1806634#M65611</guid>
      <dc:creator>Dalton_Ruer</dc:creator>
      <dc:date>2021-05-10T13:43:56Z</dc:date>
    </item>
    <item>
      <title>Re: Compare 2 Values in different rows</title>
      <link>https://community.qlik.com/t5/App-Development/Compare-2-Values-in-different-rows/m-p/1808351#M65832</link>
      <description>&lt;P&gt;The Matchfound worked.&lt;/P&gt;&lt;P&gt;Is it possible to show both as 'Yes'?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Daniel1908_0-1621253014156.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/55108iBBDD78357AF9763E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Daniel1908_0-1621253014156.png" alt="Daniel1908_0-1621253014156.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I would like to filter and show only the ones which&amp;nbsp;&lt;SPAN&gt;are equal to each other.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Kind Regards,&amp;nbsp;&lt;BR /&gt;Daniel&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 May 2021 12:04:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Compare-2-Values-in-different-rows/m-p/1808351#M65832</guid>
      <dc:creator>Daniel1908</dc:creator>
      <dc:date>2021-05-17T12:04:58Z</dc:date>
    </item>
    <item>
      <title>Re: Compare 2 Values in different rows</title>
      <link>https://community.qlik.com/t5/App-Development/Compare-2-Values-in-different-rows/m-p/1808909#M65880</link>
      <description>&lt;P&gt;Hello Together,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to use asc and desc, unfortunately without success.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Order by &lt;SPAN&gt;Price, Text, MaterialNumber&lt;/SPAN&gt; asc;&lt;/P&gt;&lt;P&gt;Order by &lt;SPAN&gt;Price, Text, MaterialNumber&lt;/SPAN&gt;&amp;nbsp;desc;&lt;/P&gt;&lt;P&gt;Is there any Idea how to show both Matchfound with "Yes"?&lt;/P&gt;&lt;P&gt;Kind Regards,&amp;nbsp;&lt;BR /&gt;Daniel&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 May 2021 08:20:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Compare-2-Values-in-different-rows/m-p/1808909#M65880</guid>
      <dc:creator>Daniel1908</dc:creator>
      <dc:date>2021-05-19T08:20:03Z</dc:date>
    </item>
  </channel>
</rss>

