<?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: Expression Question Using If/Where Logic in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Expression-Question-Using-If-Where-Logic/m-p/1554405#M744980</link>
    <description>&lt;P&gt;That seems to be working. Can you explain exactly what the algorithm is for that function? I am mainly a mathematics guy so my brain is just reading that as a bunch of grouping symbols rather than some action taking function.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 08 Mar 2019 18:37:40 GMT</pubDate>
    <dc:creator>JustinRamsey</dc:creator>
    <dc:date>2019-03-08T18:37:40Z</dc:date>
    <item>
      <title>Expression Question Using If/Where Logic</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-Question-Using-If-Where-Logic/m-p/1554270#M744978</link>
      <description>&lt;P&gt;Good Morning,&lt;/P&gt;&lt;P&gt;I am needing to add a column in a table to display a sum of Quantity where StorageType=105. We have multiple storage types indicating where parts are stored (bulk, shelf, etc). I have tried using the expression&amp;nbsp;if(StorageType='105',Quantity), it appears that is given me the total quantity if there is&amp;nbsp; a StorageType 105 established for that part. I am trying to build a table that has the part and individual columns for each storage type so we can monitor when parts are running low in standard storage to pull from other sources.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any idea what formula would do what I am asking? I have included a table view of the data, as you can see we have multiple lines for parts with different storage types. Would like to consolidate into one line per part with individual columns for the storage type quantities.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-Question-Using-If-Where-Logic/m-p/1554270#M744978</guid>
      <dc:creator>JustinRamsey</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Expression Question Using If/Where Logic</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-Question-Using-If-Where-Logic/m-p/1554369#M744979</link>
      <description>&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;Sum({&amp;lt;StorageType={105}&amp;gt;} Quantity)&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;-Rob&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Mar 2019 17:05:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-Question-Using-If-Where-Logic/m-p/1554369#M744979</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2019-03-08T17:05:03Z</dc:date>
    </item>
    <item>
      <title>Re: Expression Question Using If/Where Logic</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-Question-Using-If-Where-Logic/m-p/1554405#M744980</link>
      <description>&lt;P&gt;That seems to be working. Can you explain exactly what the algorithm is for that function? I am mainly a mathematics guy so my brain is just reading that as a bunch of grouping symbols rather than some action taking function.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Mar 2019 18:37:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-Question-Using-If-Where-Logic/m-p/1554405#M744980</guid>
      <dc:creator>JustinRamsey</dc:creator>
      <dc:date>2019-03-08T18:37:40Z</dc:date>
    </item>
    <item>
      <title>Re: Expression Question Using If/Where Logic</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-Question-Using-If-Where-Logic/m-p/1554449#M744981</link>
      <description>&lt;P&gt;The base aggregation function&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Sum(Quantity)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;returns the sum of values in the field Quantity. Typed just as "Sum(Quantity)" it would aggregate the data using the current selections (filters) as made by the user.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The bit between the {} is a Set Expression.&amp;nbsp; It modifies the current selections. A set expression is analogous to user selections.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;{&amp;lt;StorageType={105}&amp;gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;means "select 105 in&amp;nbsp; the StorageType field" before doing the Sum.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;You can read more about Set Analysis here&amp;nbsp;&lt;A href="https://help.qlik.com/en-US/qlikview/November2018/Subsystems/Client/Content/QV_QlikView/ChartFunctions/SetAnalysis/set-analysis-expressions.htm" target="_blank"&gt;https://help.qlik.com/en-US/qlikview/November2018/Subsystems/Client/Content/QV_QlikView/ChartFunctions/SetAnalysis/set-analysis-expressions.htm&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Set Analysis is an alternative to "if" and it's more efficient&amp;nbsp;and powerful.&amp;nbsp; BTW, your original expression probably would have worked as "Sum(if(StorageType=105,Quantity))".&amp;nbsp; You were just missing the Sum().&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;-Rob&lt;BR /&gt;&lt;A href="http://masterssummit.com" target="_blank"&gt;http://masterssummit.com&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://qlikviewcookbook.com" target="_blank"&gt;http://qlikviewcookbook.com&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://www.easyqlik.com" target="_blank"&gt;http://www.easyqlik.com&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Mar 2019 20:17:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-Question-Using-If-Where-Logic/m-p/1554449#M744981</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2019-03-08T20:17:23Z</dc:date>
    </item>
    <item>
      <title>Re: Expression Question Using If/Where Logic</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-Question-Using-If-Where-Logic/m-p/1554467#M744982</link>
      <description>Thanks so much for the clarification!</description>
      <pubDate>Fri, 08 Mar 2019 20:50:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-Question-Using-If-Where-Logic/m-p/1554467#M744982</guid>
      <dc:creator>JustinRamsey</dc:creator>
      <dc:date>2019-03-08T20:50:13Z</dc:date>
    </item>
  </channel>
</rss>

