<?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 If Condition to Set Analysis for multiple Calculation Condition in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/If-Condition-to-Set-Analysis-for-multiple-Calculation-Condition/m-p/1947188#M78047</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried looking the community, but couldn't find a suitable way to actually use set analysis for multiple IF statements.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a scenario for calculating based on conditions like min max and average based on some selections. Is that possible to bring inside a set rather than using this nested loop as it is making my App terribly slow.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;-&lt;/P&gt;
&lt;P&gt;=if(vMinMax='MAX' and vTemperature='TEMPERATURE' ,Round(((max({&amp;lt; date_x ={"&amp;gt;=$(vStartDate)&amp;lt;=$(vEndDate)"}&amp;gt;}value))-32)*0.5556),&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;if(vMinMax='MIN' and vTemperature='TEMPERATURE'&amp;nbsp; ,Round(((avg({&amp;lt; date_x ={"&amp;gt;=$(vStartDate)&amp;lt;=$(vEndDate)"}&amp;gt;}value))-32) * 0.5556),&lt;BR /&gt;if(vMinMax='MAX', Round(max({&amp;lt; date_x ={"&amp;gt;=$(vStartDate)&amp;lt;=$(vEndDate)"}&amp;gt;}value)),&lt;BR /&gt;if(vMinMax='AVG' and vTemperature='TEMPERATURE' and vTem=1 ,Round(((avg({&amp;lt; date_x ={"&amp;gt;=$(vStartDate)&amp;lt;=$(vEndDate)"}&amp;gt;}value))-32) * 0.5556),&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Round(avg({&amp;lt; date_x ={"&amp;gt;=$(vStartDate)&amp;lt;=$(vEndDate)"}&amp;gt;}value))&lt;/P&gt;
&lt;P&gt;)&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;vMinMax= getfieldselections(field)&amp;nbsp;&lt;/P&gt;
&lt;P&gt;vTemperature= getfieldselections (weather)&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any Help is appreciated:)&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 23 Jun 2022 06:22:10 GMT</pubDate>
    <dc:creator>joybratas1</dc:creator>
    <dc:date>2022-06-23T06:22:10Z</dc:date>
    <item>
      <title>If Condition to Set Analysis for multiple Calculation Condition</title>
      <link>https://community.qlik.com/t5/App-Development/If-Condition-to-Set-Analysis-for-multiple-Calculation-Condition/m-p/1947188#M78047</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried looking the community, but couldn't find a suitable way to actually use set analysis for multiple IF statements.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a scenario for calculating based on conditions like min max and average based on some selections. Is that possible to bring inside a set rather than using this nested loop as it is making my App terribly slow.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;-&lt;/P&gt;
&lt;P&gt;=if(vMinMax='MAX' and vTemperature='TEMPERATURE' ,Round(((max({&amp;lt; date_x ={"&amp;gt;=$(vStartDate)&amp;lt;=$(vEndDate)"}&amp;gt;}value))-32)*0.5556),&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;if(vMinMax='MIN' and vTemperature='TEMPERATURE'&amp;nbsp; ,Round(((avg({&amp;lt; date_x ={"&amp;gt;=$(vStartDate)&amp;lt;=$(vEndDate)"}&amp;gt;}value))-32) * 0.5556),&lt;BR /&gt;if(vMinMax='MAX', Round(max({&amp;lt; date_x ={"&amp;gt;=$(vStartDate)&amp;lt;=$(vEndDate)"}&amp;gt;}value)),&lt;BR /&gt;if(vMinMax='AVG' and vTemperature='TEMPERATURE' and vTem=1 ,Round(((avg({&amp;lt; date_x ={"&amp;gt;=$(vStartDate)&amp;lt;=$(vEndDate)"}&amp;gt;}value))-32) * 0.5556),&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Round(avg({&amp;lt; date_x ={"&amp;gt;=$(vStartDate)&amp;lt;=$(vEndDate)"}&amp;gt;}value))&lt;/P&gt;
&lt;P&gt;)&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;vMinMax= getfieldselections(field)&amp;nbsp;&lt;/P&gt;
&lt;P&gt;vTemperature= getfieldselections (weather)&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any Help is appreciated:)&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jun 2022 06:22:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/If-Condition-to-Set-Analysis-for-multiple-Calculation-Condition/m-p/1947188#M78047</guid>
      <dc:creator>joybratas1</dc:creator>
      <dc:date>2022-06-23T06:22:10Z</dc:date>
    </item>
    <item>
      <title>Re: If Condition to Set Analysis for multiple Calculation Condition</title>
      <link>https://community.qlik.com/t5/App-Development/If-Condition-to-Set-Analysis-for-multiple-Calculation-Condition/m-p/1947221#M78052</link>
      <description>&lt;P&gt;Set analysis is only for comparing actual fields, not variable values and it does not appear that your fields are meant to be associated to your data&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can at best replace this with Pick(Match(&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;=Pick(Match(vMinMax&amp;amp;vTemperature&amp;amp;vTem
,'MAXTEMPERATURE','MINTEMPERATURE','MAX','AVGTEMPERATURE1')+1
,Round(avg({&amp;lt; date_x ={"&amp;gt;=$(vStartDate)&amp;lt;=$(vEndDate)"}&amp;gt;}value)) // alternate
,Round(((max({&amp;lt; date_x ={"&amp;gt;=$(vStartDate)&amp;lt;=$(vEndDate)"}&amp;gt;}value))-32)*0.5556) // vMinMax='MAX' and vTemperature='TEMPERATURE' and vTem is null

,Round(((avg({&amp;lt; date_x ={"&amp;gt;=$(vStartDate)&amp;lt;=$(vEndDate)"}&amp;gt;}value))-32) * 0.5556) //vMinMax='MIN' and vTemperature='TEMPERATURE' and vTem is null

,Round(max({&amp;lt; date_x ={"&amp;gt;=$(vStartDate)&amp;lt;=$(vEndDate)"}&amp;gt;}value)) // vMinMax='MAX' and vTemperature is null and vTem is null

,Round(((avg({&amp;lt; date_x ={"&amp;gt;=$(vStartDate)&amp;lt;=$(vEndDate)"}&amp;gt;}value))-32) * 0.5556) // vMinMax='AVG' and vTemperature='TEMPERATURE' and vTem=1

)

&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 23 Jun 2022 07:40:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/If-Condition-to-Set-Analysis-for-multiple-Calculation-Condition/m-p/1947221#M78052</guid>
      <dc:creator>vinieme12</dc:creator>
      <dc:date>2022-06-23T07:40:56Z</dc:date>
    </item>
  </channel>
</rss>

