<?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 vs set in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/if-vs-set/m-p/811777#M1031013</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The variable is just a similiar If/set statement, though in the long it will have multiple criteria, so I put it in a variable to make it simpler. I have replaced it with a fixed number to be sure that is not the problem.&lt;/P&gt;&lt;P&gt;So the overall formula is (X/Y)/Z. Where Y at the moment is set to 200500100.&lt;/P&gt;&lt;P&gt;So if([Field dimA] = 'text', (sum([Field fact A]/200500100)/sum([Field dimB]))), they are from different tables connected indirectly via the keys.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In Excel the criteria/if/set formula could look like this for X could look like this =SUMIF(C:C;"=text";E:E). So I just want to search in one field, and if criteria is true, then sum correspondent rows in another field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Further more I have tried Aggr, but I have got any sense out of it so far. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 04 Feb 2015 08:29:59 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-02-04T08:29:59Z</dc:date>
    <item>
      <title>if vs set</title>
      <link>https://community.qlik.com/t5/QlikView/if-vs-set/m-p/811770#M1031006</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I have read in various threads that set should be faster and give better performance than if.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a case where I just need to say if FieldA = 'x value' then for instance multiply field B, field C and Field D.&lt;/P&gt;&lt;P&gt;It seems silly to make a set for all fields, so I would expect an if solution to be the choice?&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Feb 2015 08:12:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-vs-set/m-p/811770#M1031006</guid>
      <dc:creator />
      <dc:date>2015-02-03T08:12:57Z</dc:date>
    </item>
    <item>
      <title>Re: if vs set</title>
      <link>https://community.qlik.com/t5/QlikView/if-vs-set/m-p/811771#M1031007</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you elaborate a bit more. Set is used for creating variables and if is a control statement. What do you mean by set in relation to your question?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Feb 2015 08:15:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-vs-set/m-p/811771#M1031007</guid>
      <dc:creator>Michiel_QV_Fan</dc:creator>
      <dc:date>2015-02-03T08:15:45Z</dc:date>
    </item>
    <item>
      <title>Re: if vs set</title>
      <link>https://community.qlik.com/t5/QlikView/if-vs-set/m-p/811772#M1031008</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think he means Set Analysis and the IF() function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set Analysis and IF() are not always interchangeable. Set Analysis will reduce the data that goes into your expressions (in a very efficient way) while IF() may do different things depending on what data is offered. An IF() with an else parameter won't reduce the data, however.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Feb 2015 09:08:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-vs-set/m-p/811772#M1031008</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2015-02-03T09:08:32Z</dc:date>
    </item>
    <item>
      <title>Re: if vs set</title>
      <link>https://community.qlik.com/t5/QlikView/if-vs-set/m-p/811773#M1031009</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;oh sorry, as Peter assume, yes I do mean set analysis vs. if() .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also I forgot to ask how ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if([Field A] = 'text', sum([field B]/sum([field C]/[fieldD]))) does not work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Feb 2015 09:35:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-vs-set/m-p/811773#M1031009</guid>
      <dc:creator />
      <dc:date>2015-02-03T09:35:07Z</dc:date>
    </item>
    <item>
      <title>Re: if vs set</title>
      <link>https://community.qlik.com/t5/QlikView/if-vs-set/m-p/811774#M1031010</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Let's do this step by step.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First, why isn't it working? Is [Field A] a dimension in your table? Do the values [Field C] and [Field D] belong to the same row?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In expressions, it is important whether you place an IF() inside or ouside the aggregation functions. To figure out what will work, we need more information about your Data Model. Can you supply some?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Feb 2015 09:46:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-vs-set/m-p/811774#M1031010</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2015-02-03T09:46:22Z</dc:date>
    </item>
    <item>
      <title>Re: if vs set</title>
      <link>https://community.qlik.com/t5/QlikView/if-vs-set/m-p/811775#M1031011</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks, I dont think that I am allowed to share details, but I will try to describe. I had to change it a bit and insert a variable (which again build on a set). I have a star model, they should be connected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if([Field dimA] = 'text', (sum([Field fact A]/([$(variable1)])/sum([Field dimB])))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The result is '-'&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Feb 2015 10:50:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-vs-set/m-p/811775#M1031011</guid>
      <dc:creator />
      <dc:date>2015-02-03T10:50:43Z</dc:date>
    </item>
    <item>
      <title>Re: if vs set</title>
      <link>https://community.qlik.com/t5/QlikView/if-vs-set/m-p/811776#M1031012</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How is 'variable1' constructed and what does it look like?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Feb 2015 11:11:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-vs-set/m-p/811776#M1031012</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2015-02-03T11:11:26Z</dc:date>
    </item>
    <item>
      <title>Re: if vs set</title>
      <link>https://community.qlik.com/t5/QlikView/if-vs-set/m-p/811777#M1031013</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The variable is just a similiar If/set statement, though in the long it will have multiple criteria, so I put it in a variable to make it simpler. I have replaced it with a fixed number to be sure that is not the problem.&lt;/P&gt;&lt;P&gt;So the overall formula is (X/Y)/Z. Where Y at the moment is set to 200500100.&lt;/P&gt;&lt;P&gt;So if([Field dimA] = 'text', (sum([Field fact A]/200500100)/sum([Field dimB]))), they are from different tables connected indirectly via the keys.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In Excel the criteria/if/set formula could look like this for X could look like this =SUMIF(C:C;"=text";E:E). So I just want to search in one field, and if criteria is true, then sum correspondent rows in another field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Further more I have tried Aggr, but I have got any sense out of it so far. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Feb 2015 08:29:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-vs-set/m-p/811777#M1031013</guid>
      <dc:creator />
      <dc:date>2015-02-04T08:29:59Z</dc:date>
    </item>
    <item>
      <title>Re: if vs set</title>
      <link>https://community.qlik.com/t5/QlikView/if-vs-set/m-p/811778#M1031014</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The set would be more efficient than if in case of large data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;Rajesh Vaswani&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Feb 2015 08:51:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-vs-set/m-p/811778#M1031014</guid>
      <dc:creator>rajeshvaswani77</dc:creator>
      <dc:date>2015-02-04T08:51:22Z</dc:date>
    </item>
    <item>
      <title>Re: if vs set</title>
      <link>https://community.qlik.com/t5/QlikView/if-vs-set/m-p/811779#M1031015</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, I got it to work with set analysis, though the number it extremely low, from what to expect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The set version without variable goes like this:&lt;/P&gt;&lt;P&gt;=(Sum({$&amp;lt;[Field dimA] = {'text'}&amp;gt;} [Field fact A])&lt;/P&gt;&lt;P&gt;/sum({$&amp;lt;[Field A] -= {'text2'}&amp;gt;} [Field fact B]))&amp;nbsp; //this is the variable from above = 200500100&lt;/P&gt;&lt;P&gt;)/Sum(Sum({$&amp;lt;[Field dimA] = {'text'}&amp;gt;} [Field dimB])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How would it look like as an if formula?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Feb 2015 12:40:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-vs-set/m-p/811779#M1031015</guid>
      <dc:creator />
      <dc:date>2015-02-04T12:40:30Z</dc:date>
    </item>
    <item>
      <title>Re: if vs set</title>
      <link>https://community.qlik.com/t5/QlikView/if-vs-set/m-p/811780#M1031016</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mikael,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It would be like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;Rajesh Vaswani&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Feb 2015 05:59:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-vs-set/m-p/811780#M1031016</guid>
      <dc:creator>rajeshvaswani77</dc:creator>
      <dc:date>2015-02-05T05:59:37Z</dc:date>
    </item>
    <item>
      <title>Re: if vs set</title>
      <link>https://community.qlik.com/t5/QlikView/if-vs-set/m-p/811781#M1031017</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's really difficult to understand the root cause of the issue, just one suggestion:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;1. try break down your expression to elementary elements and show the in a table&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;2. add set analysis to each element and look whether they (a) calculated without errors and (b) satisfy your expectations&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Maxim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Feb 2015 07:27:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-vs-set/m-p/811781#M1031017</guid>
      <dc:creator>maksim_senin</dc:creator>
      <dc:date>2015-02-05T07:27:31Z</dc:date>
    </item>
    <item>
      <title>Re: if vs set</title>
      <link>https://community.qlik.com/t5/QlikView/if-vs-set/m-p/811782#M1031018</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thx, yes the set version works but would it make sense in an if analysis? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Feb 2015 15:07:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-vs-set/m-p/811782#M1031018</guid>
      <dc:creator />
      <dc:date>2015-02-05T15:07:18Z</dc:date>
    </item>
    <item>
      <title>Re: if vs set</title>
      <link>https://community.qlik.com/t5/QlikView/if-vs-set/m-p/811783#M1031019</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thx, and sorry I see it became a bit messi. I should have started with the set analysis and then ask how to make it with If analysis, as I just did in response to Rajesh.&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Feb 2015 15:09:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-vs-set/m-p/811783#M1031019</guid>
      <dc:creator />
      <dc:date>2015-02-05T15:09:54Z</dc:date>
    </item>
  </channel>
</rss>

