<?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: Difference the price vs min price in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Difference-the-price-vs-min-price/m-p/1925768#M76202</link>
    <description>&lt;P&gt;&amp;nbsp;It works!&amp;nbsp;Thanks!!&lt;/P&gt;</description>
    <pubDate>Tue, 03 May 2022 15:45:14 GMT</pubDate>
    <dc:creator>Tina_Bran</dc:creator>
    <dc:date>2022-05-03T15:45:14Z</dc:date>
    <item>
      <title>Difference the price vs min price</title>
      <link>https://community.qlik.com/t5/App-Development/Difference-the-price-vs-min-price/m-p/1925597#M76177</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;
&lt;P&gt;I need your help with an expression.&lt;/P&gt;
&lt;P&gt;I have this data set:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Tina_Bran_0-1651578921926.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/78512iF8173886FA68222A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Tina_Bran_0-1651578921926.png" alt="Tina_Bran_0-1651578921926.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I must to do something like that&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Tina_Bran_1-1651578921931.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/78511i5C9CF01AD0ABD3C2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Tina_Bran_1-1651578921931.png" alt="Tina_Bran_1-1651578921931.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My purpose is to get the minimum Price of each material, and sum the difference between&amp;nbsp; the Price and the minimun Price.&lt;/P&gt;
&lt;P&gt;Difference= Price – Min. Price&lt;/P&gt;
&lt;P&gt;Min. Price= is the minimun Price per material.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Tina_Bran_2-1651578921945.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/78513i2EECB7CFD851989C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Tina_Bran_2-1651578921945.png" alt="Tina_Bran_2-1651578921945.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I will appreciate your help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 May 2022 11:56:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Difference-the-price-vs-min-price/m-p/1925597#M76177</guid>
      <dc:creator>Tina_Bran</dc:creator>
      <dc:date>2022-05-03T11:56:51Z</dc:date>
    </item>
    <item>
      <title>Re: Difference the price vs min price</title>
      <link>https://community.qlik.com/t5/App-Development/Difference-the-price-vs-min-price/m-p/1925625#M76182</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In this use case scenario, you will need to use the "&lt;SPAN style="color:hsl(210,75%,60%);"&gt;&lt;STRONG&gt;Aggr&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;()&lt;/STRONG&gt;" function. Here are the steps that I have followed:&lt;/P&gt;&lt;P&gt;1. I have loaded the dataset:&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://lithium-response-prod.s3.us-west-2.amazonaws.com/qlik.response.lithium.com/RESPONSEIMAGE/f4c8dde1-5334-4d17-927c-1500261eb76b.default.PNG" /&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. I have added a new measure with the expression: &lt;SPAN style="color:hsl(210, 75%, 60%);"&gt;&lt;STRONG&gt;Aggr&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;SPAN style="color:hsl(210, 75%, 60%);"&gt;&lt;STRONG&gt;NODISTINCT Min&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;SPAN style="color:hsl(30, 75%, 60%);"&gt;&lt;STRONG&gt;price&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;), &lt;/STRONG&gt;&lt;SPAN style="color:hsl(30, 75%, 60%);"&gt;&lt;STRONG&gt;material&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;This will show all the minimum prices per material in a new column in the Table chart&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3. I have added another measure with the expression: &lt;SPAN style="color:hsl(30, 75%, 60%);"&gt;&lt;STRONG&gt;price &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;- &lt;/STRONG&gt;&lt;SPAN style="color:hsl(210, 75%, 60%);"&gt;&lt;STRONG&gt;Aggr&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;SPAN style="color:hsl(210, 75%, 60%);"&gt;&lt;STRONG&gt;NODISTINCT&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;SPAN style="color:hsl(210, 75%, 60%);"&gt;&lt;STRONG&gt;Min&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;SPAN style="color:hsl(30, 75%, 60%);"&gt;&lt;STRONG&gt;price&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;), &lt;/STRONG&gt;&lt;SPAN style="color:hsl(30, 75%, 60%);"&gt;&lt;STRONG&gt;material&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;This will deduct the minimum price per material from the given price of material which will result in an table as you have mentioned in the description:&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://lithium-response-prod.s3.us-west-2.amazonaws.com/qlik.response.lithium.com/RESPONSEIMAGE/b92e445e-2a7d-4e5e-8923-448abc0bdf13.default.PNG" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color:hsl(0, 0%, 60%);"&gt;&lt;I&gt;&lt;STRONG&gt;I hope that this information was helpful. In case I have misunderstood the use case scenario, please elaborate in details by providing additional information. However, if it has helped you resolve the issue, please mark it as accepted solution to give further visibility to other community members.&amp;nbsp;&lt;/STRONG&gt;&lt;/I&gt;&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 May 2022 12:42:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Difference-the-price-vs-min-price/m-p/1925625#M76182</guid>
      <dc:creator>Andrei_Cusnir</dc:creator>
      <dc:date>2022-05-03T12:42:14Z</dc:date>
    </item>
    <item>
      <title>Re: Difference the price vs min price</title>
      <link>https://community.qlik.com/t5/App-Development/Difference-the-price-vs-min-price/m-p/1925655#M76189</link>
      <description>&lt;PRE id="tw-target-text" class="tw-data-text tw-text-large tw-ta" dir="ltr" data-placeholder="Traducción"&gt;&lt;SPAN class="Y2IQFc"&gt;It works perfectly! Thanks a lot!!!&lt;/SPAN&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 03 May 2022 13:01:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Difference-the-price-vs-min-price/m-p/1925655#M76189</guid>
      <dc:creator>Tina_Bran</dc:creator>
      <dc:date>2022-05-03T13:01:33Z</dc:date>
    </item>
    <item>
      <title>Re: Difference the price vs min price</title>
      <link>https://community.qlik.com/t5/App-Development/Difference-the-price-vs-min-price/m-p/1925690#M76193</link>
      <description>&lt;P&gt;if you need totals by purchaser&lt;/P&gt;
&lt;P&gt;sum(aggr(price-min(total &amp;lt;material&amp;gt;price),purchaser,material,price))&lt;/P&gt;</description>
      <pubDate>Tue, 03 May 2022 13:38:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Difference-the-price-vs-min-price/m-p/1925690#M76193</guid>
      <dc:creator>vinieme12</dc:creator>
      <dc:date>2022-05-03T13:38:36Z</dc:date>
    </item>
    <item>
      <title>Re: Difference the price vs min price</title>
      <link>https://community.qlik.com/t5/App-Development/Difference-the-price-vs-min-price/m-p/1925768#M76202</link>
      <description>&lt;P&gt;&amp;nbsp;It works!&amp;nbsp;Thanks!!&lt;/P&gt;</description>
      <pubDate>Tue, 03 May 2022 15:45:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Difference-the-price-vs-min-price/m-p/1925768#M76202</guid>
      <dc:creator>Tina_Bran</dc:creator>
      <dc:date>2022-05-03T15:45:14Z</dc:date>
    </item>
  </channel>
</rss>

