<?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: Set Analysis with nested IF Statements and Num() Formatting in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-nested-IF-Statements-and-Num-Formatting/m-p/1454363#M609741</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If(Sum({&amp;lt;Site={'North America'}&amp;gt;}RatioFx) = 0, 'N/A', Num(Sum({&amp;lt;Site={''North America''}&amp;gt;}RatioFX), '#0.00%'))&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 11 Jan 2018 14:57:59 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2018-01-11T14:57:59Z</dc:date>
    <item>
      <title>Set Analysis with nested IF Statements and Num() Formatting</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-nested-IF-Statements-and-Num-Formatting/m-p/1454362#M609740</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I would like to convert the following if statement to the corresponding set analysis expression hoping in some performance improvements:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;= &lt;SPAN style="color: #0000ff;"&gt;If&lt;/SPAN&gt;(Site = 'North America' AND &lt;SPAN style="color: #0000ff; font-size: 13.3333px;"&gt;Sum&lt;/SPAN&gt;(RatioFX) &amp;gt; 0 &lt;SPAN style="color: #0000ff;"&gt;AND&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff; font-size: 13.3333px;"&gt;Sum&lt;/SPAN&gt;(RatioFX) &amp;lt; 1, &lt;SPAN style="color: #0000ff;"&gt;Num&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;Sum&lt;/SPAN&gt;(RatioFX),'#0.00%'), &lt;SPAN style="color: #0000ff;"&gt;If&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff; font-size: 13.3333px;"&gt;Sum&lt;/SPAN&gt;(RatioFX) = 0, 'NA', '100%'))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have converted it as follows, but would like to identify a more optimized way to write this as set analysis as I am still using 'IF's so I can format the result:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;= &lt;SPAN style="color: #0000ff;"&gt;If&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff; font-size: 13.3333px;"&gt;Sum&lt;/SPAN&gt;(&lt;STRONG&gt;{&lt;/STRONG&gt;&amp;lt;Site=&lt;STRONG&gt;{&lt;/STRONG&gt;'&lt;SPAN style="font-size: 13.3333px;"&gt;North America&lt;/SPAN&gt;'&lt;STRONG&gt;}&lt;/STRONG&gt;&amp;gt;}RatioFx) &amp;gt; 0 &lt;SPAN style="color: #0000ff;"&gt;AND&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff;"&gt;Sum&lt;/SPAN&gt;(&lt;STRONG&gt;{&lt;/STRONG&gt;&amp;lt;Site=&lt;STRONG&gt;{&lt;/STRONG&gt;'&lt;SPAN style="font-size: 13.3333px;"&gt;North America&lt;/SPAN&gt;'&lt;STRONG&gt;}&lt;/STRONG&gt;&amp;gt;&lt;STRONG&gt;}&lt;/STRONG&gt;RatioFX) &amp;lt; 1, &lt;SPAN style="color: #0000ff;"&gt;Num&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff; font-size: 13.3333px;"&gt;Sum&lt;/SPAN&gt;(&lt;STRONG&gt;{&lt;/STRONG&gt;&amp;lt;Site=&lt;STRONG&gt;{&lt;/STRONG&gt;'&lt;SPAN style="font-size: 13.3333px;"&gt;'&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;North America&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;'&lt;/SPAN&gt;'&lt;STRONG&gt;}&lt;/STRONG&gt;&amp;gt;&lt;STRONG&gt;}&lt;/STRONG&gt;RatioFX),'#0.00%'), &lt;SPAN style="color: #0000ff; font-size: 13.3333px;"&gt;If&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff; font-size: 13.3333px;"&gt;Sum&lt;/SPAN&gt;(&lt;STRONG&gt;{&lt;/STRONG&gt;&amp;lt;Site=&lt;STRONG&gt;{&lt;/STRONG&gt;'&lt;SPAN style="font-size: 13.3333px;"&gt;'&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;North America&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;'&lt;/SPAN&gt;'&lt;STRONG&gt;}&lt;/STRONG&gt;&amp;gt;}RatioFX) = 1,'100%','NA'))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Sokol&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jan 2018 14:55:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-nested-IF-Statements-and-Num-Formatting/m-p/1454362#M609740</guid>
      <dc:creator>spetushi</dc:creator>
      <dc:date>2018-01-11T14:55:06Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with nested IF Statements and Num() Formatting</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-nested-IF-Statements-and-Num-Formatting/m-p/1454363#M609741</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If(Sum({&amp;lt;Site={'North America'}&amp;gt;}RatioFx) = 0, 'N/A', Num(Sum({&amp;lt;Site={''North America''}&amp;gt;}RatioFX), '#0.00%'))&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jan 2018 14:57:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-nested-IF-Statements-and-Num-Formatting/m-p/1454363#M609741</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-01-11T14:57:59Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with nested IF Statements and Num() Formatting</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-nested-IF-Statements-and-Num-Formatting/m-p/1454364#M609742</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for the prompt suggestion Sunny! I would like to avoid showing the decimals '.00' when the result is 100% for visual affect. Only need the two decimals when the result is &amp;gt; 0 and &amp;lt; 100&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Sokol&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jan 2018 15:02:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-nested-IF-Statements-and-Num-Formatting/m-p/1454364#M609742</guid>
      <dc:creator>spetushi</dc:creator>
      <dc:date>2018-01-11T15:02:08Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with nested IF Statements and Num() Formatting</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-nested-IF-Statements-and-Num-Formatting/m-p/1454365#M609743</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If(Sum({&amp;lt;Site={'North America'}&amp;gt;}RatioFx) = 0, 'N/A', Num(Sum({&amp;lt;Site={''North America''}&amp;gt;}RatioFX), &lt;SPAN style="color: #ff0000;"&gt;If(&lt;STRONG&gt;Sum({&amp;lt;Site={''North America''}&amp;gt;}RatioFX)&lt;/STRONG&gt; = 1, '#.%', '#0.00%')&lt;/SPAN&gt;))&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jan 2018 15:11:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-nested-IF-Statements-and-Num-Formatting/m-p/1454365#M609743</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-01-11T15:11:14Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with nested IF Statements and Num() Formatting</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-nested-IF-Statements-and-Num-Formatting/m-p/1454366#M609744</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Sunny, this works!&lt;/P&gt;&lt;P&gt;What do you do for a leaving? How can I reach you privately?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jan 2018 15:37:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-nested-IF-Statements-and-Num-Formatting/m-p/1454366#M609744</guid>
      <dc:creator>spetushi</dc:creator>
      <dc:date>2018-01-11T15:37:38Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with nested IF Statements and Num() Formatting</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-nested-IF-Statements-and-Num-Formatting/m-p/1454367#M609745</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have added you as a connection... once you accept, you can send me a private message on Qlik Community&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jan 2018 15:38:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-nested-IF-Statements-and-Num-Formatting/m-p/1454367#M609745</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-01-11T15:38:52Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with nested IF Statements and Num() Formatting</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-nested-IF-Statements-and-Num-Formatting/m-p/1454368#M609746</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Done and sent you a message.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jan 2018 16:05:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-nested-IF-Statements-and-Num-Formatting/m-p/1454368#M609746</guid>
      <dc:creator>spetushi</dc:creator>
      <dc:date>2018-01-11T16:05:42Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with nested IF Statements and Num() Formatting</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-nested-IF-Statements-and-Num-Formatting/m-p/1558011#M609747</link>
      <description>Hi Sunny, it still does not work for me. My formula looks like this&lt;BR /&gt;&lt;BR /&gt;If(&lt;BR /&gt;match(Fin, 'IQ')&amp;lt;&amp;gt;0,&lt;BR /&gt;&lt;BR /&gt;num(Avg(&lt;BR /&gt;{&lt;BR /&gt;State4&amp;lt; FYear={'$(vStartYear)'}, nValue-={0}&amp;gt;&lt;BR /&gt;}&lt;BR /&gt;nValue)/100, '#,#%'),&lt;BR /&gt;&lt;BR /&gt;Avg(&lt;BR /&gt;{&lt;BR /&gt;State4&amp;lt; FYear={'$(vStartYear)'}, nValue-={0}&amp;gt;&lt;BR /&gt;}&lt;BR /&gt;nValue)&lt;BR /&gt;)&lt;BR /&gt;&lt;BR /&gt;Could you help? Thanks!&lt;BR /&gt;</description>
      <pubDate>Mon, 18 Mar 2019 15:49:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-nested-IF-Statements-and-Num-Formatting/m-p/1558011#M609747</guid>
      <dc:creator>qlikdelqbz</dc:creator>
      <dc:date>2019-03-18T15:49:18Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with nested IF Statements and Num() Formatting</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-nested-IF-Statements-and-Num-Formatting/m-p/1558014#M609748</link>
      <description>And I am using Qlik Sense. Maybe it only works in QlikView?</description>
      <pubDate>Mon, 18 Mar 2019 15:51:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-nested-IF-Statements-and-Num-Formatting/m-p/1558014#M609748</guid>
      <dc:creator>qlikdelqbz</dc:creator>
      <dc:date>2019-03-18T15:51:21Z</dc:date>
    </item>
  </channel>
</rss>

