<?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 Then Else error in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/If-Then-Else-error/m-p/1648297#M731006</link>
    <description>&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;IF([CC_MCC_Desc] = 'Grocery Stores and Supermarkets', Sum({&amp;lt;[CC_MCC_Desc] = {'Grocery Stores and Supermarkets'}&amp;gt;}[CC_ITEM_COST]), Sum([CC_Tran_Amt]))&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 19 Nov 2019 07:48:14 GMT</pubDate>
    <dc:creator>simrankaur</dc:creator>
    <dc:date>2019-11-19T07:48:14Z</dc:date>
    <item>
      <title>If Then Else error</title>
      <link>https://community.qlik.com/t5/QlikView/If-Then-Else-error/m-p/1648135#M731005</link>
      <description>&lt;P&gt;Hi - after completing this conditional statement and using it in one of my charts I realized I made an error and do not get my desired result..&lt;/P&gt;&lt;P&gt;Statement:&amp;nbsp; &amp;nbsp;&amp;nbsp;IF([CC_MCC_Desc] = 'Grocery Stores and Supermarkets', Sum([CC_ITEM_COST]), Sum([CC_Tran_Amt]))&lt;/P&gt;&lt;P&gt;this statement works in the chart only when the value&amp;nbsp;'Grocery Stores and Supermarkets' is selected In my CC_MCC_Desc list box.&lt;/P&gt;&lt;P&gt;what I really need to do is have it function all the time aeven when this specific selection isn't made since there is a mixture of records.&amp;nbsp; &amp;nbsp;What did I do wrong?&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 01:55:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-Then-Else-error/m-p/1648135#M731005</guid>
      <dc:creator>gfisch13</dc:creator>
      <dc:date>2024-11-16T01:55:02Z</dc:date>
    </item>
    <item>
      <title>Re: If Then Else error</title>
      <link>https://community.qlik.com/t5/QlikView/If-Then-Else-error/m-p/1648297#M731006</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;IF([CC_MCC_Desc] = 'Grocery Stores and Supermarkets', Sum({&amp;lt;[CC_MCC_Desc] = {'Grocery Stores and Supermarkets'}&amp;gt;}[CC_ITEM_COST]), Sum([CC_Tran_Amt]))&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Nov 2019 07:48:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-Then-Else-error/m-p/1648297#M731006</guid>
      <dc:creator>simrankaur</dc:creator>
      <dc:date>2019-11-19T07:48:14Z</dc:date>
    </item>
    <item>
      <title>Re: If Then Else error</title>
      <link>https://community.qlik.com/t5/QlikView/If-Then-Else-error/m-p/1648298#M731007</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;In your expression, when you write the condition&amp;nbsp;&lt;EM&gt;[CC_MCC_Desc] = 'Grocery Stores and Supermarkets',&lt;/EM&gt; it is equivalent to &lt;EM&gt;&lt;FONT color="#FF0000"&gt;Only(&lt;/FONT&gt;[CC_MCC_Desc]&lt;FONT color="#FF0000"&gt;)&lt;/FONT&gt; = 'Grocery Stores and Supermarkets'&lt;/EM&gt;. This is because in an expression you &lt;STRONG&gt;must&lt;/STRONG&gt; aggregate data using agregation functions (like sum, count, max, only...). Thus, if you do not use agregation functions Qlik uses Only as default.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Said so, what is the logic of your expression? I mean, if nothing is selected on CC_MCC_Desc, how should it behave?&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jaime.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Nov 2019 07:53:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-Then-Else-error/m-p/1648298#M731007</guid>
      <dc:creator>jaibau1993</dc:creator>
      <dc:date>2019-11-19T07:53:00Z</dc:date>
    </item>
    <item>
      <title>Re: If Then Else error</title>
      <link>https://community.qlik.com/t5/QlikView/If-Then-Else-error/m-p/1648340#M731009</link>
      <description>&lt;P&gt;May be this:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;IF(&lt;STRONG&gt;Max(Match&lt;/STRONG&gt;([CC_MCC_Desc], 'Grocery Stores and Supermarkets')&lt;STRONG&gt;)=1&lt;/STRONG&gt;, Sum([CC_ITEM_COST]), Sum([CC_Tran_Amt]))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This expression would work (with/without selection) in checking of that specific value in the field.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Nov 2019 08:57:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-Then-Else-error/m-p/1648340#M731009</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2019-11-19T08:57:00Z</dc:date>
    </item>
    <item>
      <title>Re: If Then Else error</title>
      <link>https://community.qlik.com/t5/QlikView/If-Then-Else-error/m-p/1648353#M731010</link>
      <description>&lt;P&gt;Hi Tresesco!&lt;/P&gt;&lt;P&gt;Will it work? I don't get the logic. Is Match evaluated for each CC_MCC_Desc record without the need of Aggr function?&lt;/P&gt;&lt;P&gt;As equivalent to what you purpose, I would have write something like&lt;/P&gt;&lt;P&gt;&lt;EM&gt;If( Index(&lt;FONT color="#FF0000"&gt;Concat&lt;/FONT&gt;(CC_MCC_Desc),&amp;nbsp;'Grocery Stores and Supermarkets'), then, else)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jaime.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Nov 2019 09:11:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-Then-Else-error/m-p/1648353#M731010</guid>
      <dc:creator>jaibau1993</dc:creator>
      <dc:date>2019-11-19T09:11:31Z</dc:date>
    </item>
    <item>
      <title>Re: If Then Else error</title>
      <link>https://community.qlik.com/t5/QlikView/If-Then-Else-error/m-p/1648377#M731011</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN&gt;Jaime,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Aggr function is there (max) in my expression; you are using index outside it, I am using using it inside. Both will work. Give a try in a sample data to find a specific string/value.&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Nov 2019 09:54:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-Then-Else-error/m-p/1648377#M731011</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2019-11-19T09:54:48Z</dc:date>
    </item>
    <item>
      <title>Re: If Then Else error</title>
      <link>https://community.qlik.com/t5/QlikView/If-Then-Else-error/m-p/1648386#M731012</link>
      <description>&lt;P&gt;Hi Tresesco:&lt;/P&gt;&lt;P&gt;What I did not know (and it is what confused me) is that Match returns a &lt;U&gt;&lt;STRONG&gt;list of values&lt;/STRONG&gt;&lt;/U&gt; when used as you did:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Match.png" style="width: 197px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/23919i6C052E33EBF343F7/image-size/large?v=v2&amp;amp;px=999" role="button" title="Match.png" alt="Match.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Nice lesson learned today!&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jaime.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Nov 2019 10:08:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-Then-Else-error/m-p/1648386#M731012</guid>
      <dc:creator>jaibau1993</dc:creator>
      <dc:date>2019-11-19T10:08:28Z</dc:date>
    </item>
    <item>
      <title>Re: If Then Else error</title>
      <link>https://community.qlik.com/t5/QlikView/If-Then-Else-error/m-p/1648396#M731013</link>
      <description>&lt;P&gt;This is nothing special about match() - I would say. It's rather because of aggregation function you use outside. The similar behavior you would see with other functions as well. Here index() would be similar utility case. I.e. - you can use index() in exact similar fashion.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Nov 2019 10:28:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-Then-Else-error/m-p/1648396#M731013</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2019-11-19T10:28:30Z</dc:date>
    </item>
    <item>
      <title>Re: If Then Else error</title>
      <link>https://community.qlik.com/t5/QlikView/If-Then-Else-error/m-p/1649795#M731014</link>
      <description>&lt;P&gt;Thank you all for the learning opportunity!&lt;/P&gt;</description>
      <pubDate>Thu, 21 Nov 2019 19:34:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-Then-Else-error/m-p/1649795#M731014</guid>
      <dc:creator>gfisch13</dc:creator>
      <dc:date>2019-11-21T19:34:12Z</dc:date>
    </item>
  </channel>
</rss>

