<?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: IF and MAX function in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/IF-and-MAX-function/m-p/1662850#M49816</link>
    <description>&lt;P&gt;Have you found a solution (as you've marked you have) or are you still having problems (as you are saying in your comment)?&lt;/P&gt;&lt;P&gt;If you are still having issues, can you upload your dashboard and clarify what you are trying to achieve?&lt;/P&gt;</description>
    <pubDate>Mon, 06 Jan 2020 11:00:30 GMT</pubDate>
    <dc:creator>lorenzoconforti</dc:creator>
    <dc:date>2020-01-06T11:00:30Z</dc:date>
    <item>
      <title>IF and MAX function</title>
      <link>https://community.qlik.com/t5/App-Development/IF-and-MAX-function/m-p/1662483#M49752</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm struggling to combine the below into one using an IF function. I have a filter #months to forecast and I want the KPI to change based on what I select. For each month there are different recommendations with different associated values.&amp;nbsp; I am able to get the right KPIs for month 1, 2 and 3 when I use the below; however, I need to use an IF function to combine it into one field. Thanks for your help in advance!&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Month 1 KPI:&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Money(max({&amp;lt;Date={'Mar-19'}, [#months to predict]={'1 month'}&amp;gt;+&amp;lt;[#months to predict]={'2 month'}&amp;gt;+&amp;lt;[#months to predict]={'3 month'}&amp;gt;}&lt;BR /&gt;[Predicted Sales value]/1000000)&lt;BR /&gt;-&lt;BR /&gt;max({&amp;lt;Date={'Mar-19'},[#months to predict]={'1 month'}&amp;gt;+&amp;lt;[#months to predict]={'2 month'}&amp;gt;+&amp;lt;[#months to predict]={'3 month'},&lt;BR /&gt;[Predicted Sell Out Sales value]=,[actual_or_forecast]={'F'}&amp;gt;} [Sales value in the past X no. of months]/1000000),&lt;BR /&gt;'#0.00 M')&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Month&amp;nbsp; 2 KPI:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Money(max({&amp;lt;Date={'Apr-19'}, [#months to predict]={'2 month'}&amp;gt;}&lt;BR /&gt;[Predicted Sales value]/1000000)&lt;BR /&gt;-&lt;BR /&gt;max({&amp;lt;Date={'Apr-19'},[#months to predict]={'2 month'},&lt;BR /&gt;[Predicted Sell Out Sales value]=,[actual_or_forecast]={'F'}&amp;gt;} [Sales value in the past X no. of months]/1000000)&lt;BR /&gt;, '#0.00 M')&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;Month 3 KPI:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Money(max({&amp;lt;Date={'Mar-19'}, [#months to predict]={'3 month'}&amp;gt;}&lt;BR /&gt;[Predicted Sales value]/1000000)&lt;BR /&gt;-&lt;BR /&gt;max({&amp;lt;Date={'Mar-19'},[#months to predict]={'3 month'},&lt;BR /&gt;[Predicted Sell Out Sales value]=,[actual_or_forecast]={'F'}&amp;gt;} [Sales value in the past X no. of months]/1000000)&lt;BR /&gt;,&lt;BR /&gt;'#0.00 M')&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;UPDATE: &lt;/STRONG&gt;I'VE SIMPLIFIED THE ABOVE CALCULATIONS&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jan 2020 10:41:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/IF-and-MAX-function/m-p/1662483#M49752</guid>
      <dc:creator>qlikie</dc:creator>
      <dc:date>2020-01-06T10:41:14Z</dc:date>
    </item>
    <item>
      <title>Re: IF and MAX function</title>
      <link>https://community.qlik.com/t5/App-Development/IF-and-MAX-function/m-p/1662650#M49792</link>
      <description>&lt;P&gt;Use pick/match in your KPI object. Check what the user has selected in months to forecast and, according to the value, calculate the relevant KPI. In the example below replace "Month x KPI" with your expressions; alternatively upload your app so that we can have a look at it&lt;/P&gt;&lt;P&gt;=pick(match(only([&lt;SPAN&gt;&amp;nbsp;#months to forecast]&lt;/SPAN&gt;),1, 2, 3),&lt;/P&gt;&lt;P&gt;Month 1 KPI,&lt;/P&gt;&lt;P&gt;Month 2 KPI,&lt;/P&gt;&lt;P&gt;Month 3 KPI&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 04 Jan 2020 23:55:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/IF-and-MAX-function/m-p/1662650#M49792</guid>
      <dc:creator>lorenzoconforti</dc:creator>
      <dc:date>2020-01-04T23:55:43Z</dc:date>
    </item>
    <item>
      <title>Re: IF and MAX function</title>
      <link>https://community.qlik.com/t5/App-Development/IF-and-MAX-function/m-p/1662682#M49802</link>
      <description>&lt;P&gt;The thing to do here is to put each of the KPI expressions into a variable, which then makes the pick/match expression much more manageable.&lt;/P&gt;&lt;P&gt;The new container objects in Sense would allow you to have a display condition on three different KPI objects and you could have a different expression on each. This may be a better way of dealing with it, as it gives you flexibility around exactly how each KPI should look.&lt;/P&gt;&lt;P&gt;Steve&lt;/P&gt;</description>
      <pubDate>Sun, 05 Jan 2020 15:47:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/IF-and-MAX-function/m-p/1662682#M49802</guid>
      <dc:creator>stevedark</dc:creator>
      <dc:date>2020-01-05T15:47:11Z</dc:date>
    </item>
    <item>
      <title>Re: IF and MAX function</title>
      <link>https://community.qlik.com/t5/App-Development/IF-and-MAX-function/m-p/1662846#M49814</link>
      <description>&lt;P&gt;Thanks a lot. I've tried this; however, I seem to only be getting the first value when I choose '1 month'. When I select '2 months' or '3 months' there's no value at all.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jan 2020 10:42:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/IF-and-MAX-function/m-p/1662846#M49814</guid>
      <dc:creator>qlikie</dc:creator>
      <dc:date>2020-01-06T10:42:51Z</dc:date>
    </item>
    <item>
      <title>Re: IF and MAX function</title>
      <link>https://community.qlik.com/t5/App-Development/IF-and-MAX-function/m-p/1662850#M49816</link>
      <description>&lt;P&gt;Have you found a solution (as you've marked you have) or are you still having problems (as you are saying in your comment)?&lt;/P&gt;&lt;P&gt;If you are still having issues, can you upload your dashboard and clarify what you are trying to achieve?&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jan 2020 11:00:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/IF-and-MAX-function/m-p/1662850#M49816</guid>
      <dc:creator>lorenzoconforti</dc:creator>
      <dc:date>2020-01-06T11:00:30Z</dc:date>
    </item>
    <item>
      <title>Re: IF and MAX function</title>
      <link>https://community.qlik.com/t5/App-Development/IF-and-MAX-function/m-p/1662852#M49817</link>
      <description>&lt;P&gt;I have, thanks a lot! A combination of pick/match and putting KPIs into variables worked perfectly in a container object.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jan 2020 11:05:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/IF-and-MAX-function/m-p/1662852#M49817</guid>
      <dc:creator>qlikie</dc:creator>
      <dc:date>2020-01-06T11:05:14Z</dc:date>
    </item>
  </channel>
</rss>

