<?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: Grouping in If Statement in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Grouping-in-If-Statement/m-p/935495#M322999</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It may be you are missing TOTAL Qualifier.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; line-height: 1.5em;"&gt;If(Aggr(sum(Field),Field) / Aggr(Sum(TOTAL Field),Field)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 17 Aug 2015 09:56:15 GMT</pubDate>
    <dc:creator>MK_QSL</dc:creator>
    <dc:date>2015-08-17T09:56:15Z</dc:date>
    <item>
      <title>Grouping in If Statement</title>
      <link>https://community.qlik.com/t5/QlikView/Grouping-in-If-Statement/m-p/935492#M322996</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there an easy way on creating this formula&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If(Aggr(sum(Field1),Field2) / Aggr(Sum(Field3),Field2) &amp;gt;=1.001 and Aggr(sum(Field1),Field2) / Aggr(Sum(Field3),Field2) &amp;lt;=1.100}, '1.001 - 1.100')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;something like,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If(Aggr(sum(Field1),Field2) / Aggr(Sum(Field3),Field2) = {"&amp;gt;=1.001 &amp;lt;=1.100"}, '1.001 - 1.100').&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Aug 2015 09:38:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Grouping-in-If-Statement/m-p/935492#M322996</guid>
      <dc:creator />
      <dc:date>2015-08-17T09:38:37Z</dc:date>
    </item>
    <item>
      <title>Re: Grouping in If Statement</title>
      <link>https://community.qlik.com/t5/QlikView/Grouping-in-If-Statement/m-p/935493#M322997</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;how many different fields are there ? or&amp;nbsp; there are&amp;nbsp; only two fields , one which is being calculated and&amp;nbsp; one for sorting. ?&lt;/P&gt;&lt;P&gt;if there are different&amp;nbsp; fields involved then&amp;nbsp; on the basis of that set analysis will be maid. let me know&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards &lt;/P&gt;&lt;P&gt;Ankit Bisht&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Aug 2015 09:47:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Grouping-in-If-Statement/m-p/935493#M322997</guid>
      <dc:creator>ankitbisht01</dc:creator>
      <dc:date>2015-08-17T09:47:00Z</dc:date>
    </item>
    <item>
      <title>Re: Grouping in If Statement</title>
      <link>https://community.qlik.com/t5/QlikView/Grouping-in-If-Statement/m-p/935494#M322998</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Aggr(sum(Field),Field) = Sum(Field) or Sum(DISTINCT Field). The unnecessary Aggr() will add to the time taken to calculate the expression. And &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Aggr(sum(Field),Field) / Aggr(Sum(Field),Field) will always return 1.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;I would try to do this sort of grouping/bucketting in the load script, but if you have to do it in the front end, then (assuming its a calculated dimension), for what group are you summing the values of Field?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Aug 2015 09:54:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Grouping-in-If-Statement/m-p/935494#M322998</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2015-08-17T09:54:21Z</dc:date>
    </item>
    <item>
      <title>Re: Grouping in If Statement</title>
      <link>https://community.qlik.com/t5/QlikView/Grouping-in-If-Statement/m-p/935495#M322999</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It may be you are missing TOTAL Qualifier.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; line-height: 1.5em;"&gt;If(Aggr(sum(Field),Field) / Aggr(Sum(TOTAL Field),Field)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Aug 2015 09:56:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Grouping-in-If-Statement/m-p/935495#M322999</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2015-08-17T09:56:15Z</dc:date>
    </item>
    <item>
      <title>Re: Grouping in If Statement</title>
      <link>https://community.qlik.com/t5/QlikView/Grouping-in-If-Statement/m-p/935496#M323000</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There are 3 fields,&amp;nbsp; sorry for the confusion, I already edited my post.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Aug 2015 09:59:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Grouping-in-If-Statement/m-p/935496#M323000</guid>
      <dc:creator />
      <dc:date>2015-08-17T09:59:15Z</dc:date>
    </item>
    <item>
      <title>Re: Grouping in If Statement</title>
      <link>https://community.qlik.com/t5/QlikView/Grouping-in-If-Statement/m-p/935497#M323001</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;no, I just want to create an if statement without repeating the same condition with the difference of &amp;gt;= and &amp;lt;=. there might be script that will not repeat the statement, just like in the set analysis which is condition = {&amp;gt;=value&amp;lt;=value}.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Aug 2015 10:02:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Grouping-in-If-Statement/m-p/935497#M323001</guid>
      <dc:creator />
      <dc:date>2015-08-17T10:02:28Z</dc:date>
    </item>
    <item>
      <title>Re: Grouping in If Statement</title>
      <link>https://community.qlik.com/t5/QlikView/Grouping-in-If-Statement/m-p/935498#M323002</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Royce,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd make such operations in the script and avoid calculating aggr() within an if statement. Using aggr generally leads to increased chart calculation time. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CalculatedFields:&lt;/P&gt;&lt;P&gt;Load Field2,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if( sum(Field1)/sum(Field3) &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&amp;gt;= num(1.001) and &lt;SPAN style="font-size: 13.3333330154419px;"&gt;sum(Field1)/sum(Field3) &amp;lt;= num(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;1.100), '1.001 - 1.100')&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;From Table&lt;/P&gt;&lt;P&gt;Group by Field2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alvaro P.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Aug 2015 10:09:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Grouping-in-If-Statement/m-p/935498#M323002</guid>
      <dc:creator>Alvaro_Palacios</dc:creator>
      <dc:date>2015-08-17T10:09:27Z</dc:date>
    </item>
    <item>
      <title>Re: Grouping in If Statement</title>
      <link>https://community.qlik.com/t5/QlikView/Grouping-in-If-Statement/m-p/935499#M323003</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you could may be put your expression Aggr(sum(Field1),Field2) / Aggr(Sum(Field3),Field2) in a variable&lt;/P&gt;&lt;P&gt;and use it in the If condition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(($variable)&amp;gt;1.001 and ($variable)&amp;lt;=1.100,'1.001 - 1.100')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can not mix set analysis syntax in the if condition as below&lt;/P&gt;&lt;P&gt;If(Aggr(sum(Field1),Field2) / Aggr(Sum(Field3),Field2) = {"&amp;gt;=1.001 &amp;lt;=1.100"}, '1.001 - 1.100').&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hth&lt;/P&gt;&lt;P&gt;Sasi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Aug 2015 10:27:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Grouping-in-If-Statement/m-p/935499#M323003</guid>
      <dc:creator>sasiparupudi1</dc:creator>
      <dc:date>2015-08-17T10:27:27Z</dc:date>
    </item>
    <item>
      <title>Re: Grouping in If Statement</title>
      <link>https://community.qlik.com/t5/QlikView/Grouping-in-If-Statement/m-p/935500#M323004</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;it can be cut short something like this :&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;If(Aggr ((sum(Field1) / Sum(Field3)),Field2) &amp;gt;=1.001 and Aggr&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;((sum(Field1) / Sum(Field3))&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;,Field2)&lt;/SPAN&gt;&lt;/SPAN&gt; &amp;lt;=1.100}, '1.001 -1.100').&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;But where what would you like to write in else ? , and where you want to use this script , backend or fornt end.?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Ankit Bisht&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Aug 2015 10:33:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Grouping-in-If-Statement/m-p/935500#M323004</guid>
      <dc:creator>ankitbisht01</dc:creator>
      <dc:date>2015-08-17T10:33:44Z</dc:date>
    </item>
  </channel>
</rss>

