<?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 Set Analysis with embedded IF statement in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-embedded-IF-statement/m-p/452267#M489196</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have an industry hierarchy in my qvw: Industry -&amp;gt; Product -&amp;gt; Sub Product. I have a drill down dimension in my straight table that is: Industry -&amp;gt; Region -&amp;gt; Sub Region -&amp;gt; Client (or others that mix the geography hierarchy and industry hierarchy)&amp;nbsp; To find the most specific industry selection, I can do: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13534306892692104" jivemacro_uid="_13534306892692104"&gt;&lt;P&gt;=IF(not isnull([Sub Product]),[Sub Product],&lt;/P&gt;&lt;P&gt;IF(not IsNull([Product]), [Product], Industry)))&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as an expression in my table. That way if the dimension is Product, the expression will reflect the different products in each row. Otherwise if I have drilled past Product to Region, all rows will reflect the product selected. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My problem is that I would like to use this most specific industry in my set analysis, doing something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="java" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13534307249984666" jivemacro_uid="_13534307249984666"&gt;&lt;P&gt;=sum({$&amp;lt;%Franchise={"$(=IF(not isnull([Sub Product]),[Sub Product],&lt;/P&gt;&lt;P&gt;IF(not IsNull([Product]), [Product], Industry)))"}&amp;gt;} %Rank)&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where %Franchise is one field of an inline table.&amp;nbsp; If you have any suggestions it would be greatly appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 20 Nov 2012 16:54:12 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-11-20T16:54:12Z</dc:date>
    <item>
      <title>Set Analysis with embedded IF statement</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-embedded-IF-statement/m-p/452267#M489196</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have an industry hierarchy in my qvw: Industry -&amp;gt; Product -&amp;gt; Sub Product. I have a drill down dimension in my straight table that is: Industry -&amp;gt; Region -&amp;gt; Sub Region -&amp;gt; Client (or others that mix the geography hierarchy and industry hierarchy)&amp;nbsp; To find the most specific industry selection, I can do: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13534306892692104" jivemacro_uid="_13534306892692104"&gt;&lt;P&gt;=IF(not isnull([Sub Product]),[Sub Product],&lt;/P&gt;&lt;P&gt;IF(not IsNull([Product]), [Product], Industry)))&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as an expression in my table. That way if the dimension is Product, the expression will reflect the different products in each row. Otherwise if I have drilled past Product to Region, all rows will reflect the product selected. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My problem is that I would like to use this most specific industry in my set analysis, doing something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="java" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13534307249984666" jivemacro_uid="_13534307249984666"&gt;&lt;P&gt;=sum({$&amp;lt;%Franchise={"$(=IF(not isnull([Sub Product]),[Sub Product],&lt;/P&gt;&lt;P&gt;IF(not IsNull([Product]), [Product], Industry)))"}&amp;gt;} %Rank)&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where %Franchise is one field of an inline table.&amp;nbsp; If you have any suggestions it would be greatly appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Nov 2012 16:54:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-embedded-IF-statement/m-p/452267#M489196</guid>
      <dc:creator />
      <dc:date>2012-11-20T16:54:12Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with embedded IF statement</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-embedded-IF-statement/m-p/452268#M489197</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;Set for not is null&lt;/P&gt;&lt;P&gt;Franchise={'*'}&lt;/P&gt;&lt;P&gt;That means, it has to have a value, therefore is not null.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You may use it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Nov 2012 16:57:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-embedded-IF-statement/m-p/452268#M489197</guid>
      <dc:creator>christian77</dc:creator>
      <dc:date>2012-11-20T16:57:40Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis with embedded IF statement</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-embedded-IF-statement/m-p/452269#M489198</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want the Franchise selection to be the lowest level industry selection, not just any value. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Nov 2012 17:04:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-embedded-IF-statement/m-p/452269#M489198</guid>
      <dc:creator />
      <dc:date>2012-11-20T17:04:43Z</dc:date>
    </item>
  </channel>
</rss>

