<?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: nested if() value in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/nested-if-value/m-p/558017#M1139355</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ha alright, the first part of you reply actually worked. It didn't work when I did it because of the {&amp;nbsp; } I used..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks, I think I've got it already!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Will also try the other options! May be useful at some point in life &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 15 Oct 2013 09:19:48 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-10-15T09:19:48Z</dc:date>
    <item>
      <title>nested if() value</title>
      <link>https://community.qlik.com/t5/QlikView/nested-if-value/m-p/558014#M1139352</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm struggling with an easy problem (I think it's easy anyway).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've got a dimension called "group" with values "set1", "set2", "set3", ....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Each value has got it's own target (sales):&lt;/P&gt;&lt;P&gt;set1 = 10.000 euro&lt;/P&gt;&lt;P&gt;set2 = 20.000 euro&lt;/P&gt;&lt;P&gt;set3 = 30.000 euro&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've got a chart (table) that shows the &lt;STRONG&gt;current&lt;/STRONG&gt; sales for each set. In the second column (second expression), it should show me the &lt;STRONG&gt;target&lt;/STRONG&gt; for each set.&lt;/P&gt;&lt;P&gt;(I know I can add a new field, but I do not want to touch the codes).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I was thinking something like:&lt;/P&gt;&lt;P&gt;=if (group = {'set1'}, 10000, if (group = {'set2'}, 20000, .... })&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See where I am going? Like a nested if-function in Excel..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone know how to enter the expression?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;P&gt;Zipke&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Oct 2013 09:11:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/nested-if-value/m-p/558014#M1139352</guid>
      <dc:creator />
      <dc:date>2013-10-15T09:11:23Z</dc:date>
    </item>
    <item>
      <title>Re: nested if() value</title>
      <link>https://community.qlik.com/t5/QlikView/nested-if-value/m-p/558015#M1139353</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I understand correctly, your idea should work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=if (group = 'set1', 10000, if (group = 'set2', 20000, .... ))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or maybe like&lt;/P&gt;&lt;P&gt;=pick(match(group,'set1','set2'),&lt;/P&gt;&lt;P&gt;10000,&lt;/P&gt;&lt;P&gt;20000&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;edit:&lt;/P&gt;&lt;P&gt;Or just create a INLINE table in your script and use the associative logic:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;group, target&lt;/P&gt;&lt;P&gt;set1, 10000&lt;/P&gt;&lt;P&gt;set2, 20000&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then just use an expression&lt;/P&gt;&lt;P&gt;=only(target)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Oct 2013 09:16:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/nested-if-value/m-p/558015#M1139353</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2013-10-15T09:16:05Z</dc:date>
    </item>
    <item>
      <title>Re: nested if() value</title>
      <link>https://community.qlik.com/t5/QlikView/nested-if-value/m-p/558016#M1139354</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Put the expression simply like: = FieldNameWithTargetData&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or, if you want the numeric representation may try:&amp;nbsp;&amp;nbsp;&amp;nbsp; =Num(Subfield(TragetField, '.', 1))*1000&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Oct 2013 09:17:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/nested-if-value/m-p/558016#M1139354</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2013-10-15T09:17:49Z</dc:date>
    </item>
    <item>
      <title>Re: nested if() value</title>
      <link>https://community.qlik.com/t5/QlikView/nested-if-value/m-p/558017#M1139355</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ha alright, the first part of you reply actually worked. It didn't work when I did it because of the {&amp;nbsp; } I used..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks, I think I've got it already!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Will also try the other options! May be useful at some point in life &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Oct 2013 09:19:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/nested-if-value/m-p/558017#M1139355</guid>
      <dc:creator />
      <dc:date>2013-10-15T09:19:48Z</dc:date>
    </item>
    <item>
      <title>Re: nested if() value</title>
      <link>https://community.qlik.com/t5/QlikView/nested-if-value/m-p/558018#M1139356</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey tresesco, thank you for your reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please explain me the first part of your reply? What does this actually do?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(The second part won't be useful, I just used those number 1&amp;gt; 10000, 2&amp;gt; 20000, ...,&amp;nbsp; to make the communication easier, but they are not the correct numbers. But it would have been a clever solution tough! Thanks! &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Oct 2013 09:26:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/nested-if-value/m-p/558018#M1139356</guid>
      <dc:creator />
      <dc:date>2013-10-15T09:26:08Z</dc:date>
    </item>
  </channel>
</rss>

