<?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: variable in set analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/variable-in-set-analysis/m-p/458911#M1152833</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi. &lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;I have created a variable that identifies which rows I want to keep (marked with a -1) and the rest are blank ( -).&amp;nbsp; What I am trying to figure out is how to automatically filter these from the pivot table&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Are you talking about variable or field ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 May 2013 06:49:53 GMT</pubDate>
    <dc:creator>whiteline</dc:creator>
    <dc:date>2013-05-15T06:49:53Z</dc:date>
    <item>
      <title>variable in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/variable-in-set-analysis/m-p/458907#M1152826</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I haven't managed to find an example that answers my question, so hopefully you are able to help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a variable which results in either a 1 or a 0.&amp;nbsp; If this is possible, what would be the correct syntax as I always get an error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum( {$&amp;lt; $(myVariable) = {1}&amp;gt;}&amp;nbsp; field)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Oli&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 May 2013 14:38:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/variable-in-set-analysis/m-p/458907#M1152826</guid>
      <dc:creator />
      <dc:date>2013-05-14T14:38:14Z</dc:date>
    </item>
    <item>
      <title>Re: variable in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/variable-in-set-analysis/m-p/458908#M1152828</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Unless your variable returns a field that cannot work. Only fields can be used on the left side of the comparison for set modifiers. sum( if( $(myVariable) = 1, field) ) will work. But it doesn't make much sense if myVariable doesn't vary. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 May 2013 14:46:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/variable-in-set-analysis/m-p/458908#M1152828</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-05-14T14:46:00Z</dc:date>
    </item>
    <item>
      <title>Re: variable in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/variable-in-set-analysis/m-p/458909#M1152830</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;Thanks for the quick response. I think what I was trying to do will not work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a pivot table filtered to show one product.&amp;nbsp; Each product will have a nett price a selection of special customer prices and various promotional prices.&amp;nbsp; I want to narrow this down for ease of viewing to just 6 prices.&amp;nbsp; The lowest Promo price, the Top 5 cheapest customer specials and the nett price.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created a variable that identifies which rows I want to keep (marked with a -1) and the rest are blank ( -).&amp;nbsp; What I am trying to figure out is how to automatically filter these from the pivot table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;myVariable&lt;/P&gt;&lt;P&gt;(if(Type='Nett',-1)) or (if((rank(if(Type = 'Range' ,-Price),5)&amp;lt;=5)=-1,-1)) or (if((rank(if(Type = 'Promo' ,-Price),1)=1)=-1,-1))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can't seem figure out which road to take to achieve my goal.&lt;/P&gt;&lt;P&gt;PS I would post my workbook but it sensitive data.&amp;nbsp; Maybe, i'll be able to mock something up as an example...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 May 2013 15:58:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/variable-in-set-analysis/m-p/458909#M1152830</guid>
      <dc:creator />
      <dc:date>2013-05-14T15:58:35Z</dc:date>
    </item>
    <item>
      <title>Re: variable in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/variable-in-set-analysis/m-p/458910#M1152832</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could scramble your data - Then it would be easier. If that is possible&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 May 2013 19:41:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/variable-in-set-analysis/m-p/458910#M1152832</guid>
      <dc:creator />
      <dc:date>2013-05-14T19:41:12Z</dc:date>
    </item>
    <item>
      <title>Re: variable in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/variable-in-set-analysis/m-p/458911#M1152833</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi. &lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;I have created a variable that identifies which rows I want to keep (marked with a -1) and the rest are blank ( -).&amp;nbsp; What I am trying to figure out is how to automatically filter these from the pivot table&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Are you talking about variable or field ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 May 2013 06:49:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/variable-in-set-analysis/m-p/458911#M1152833</guid>
      <dc:creator>whiteline</dc:creator>
      <dc:date>2013-05-15T06:49:53Z</dc:date>
    </item>
    <item>
      <title>Re: variable in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/variable-in-set-analysis/m-p/458912#M1152834</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;I have managed to create a sample file which hopefully better demonstrates my question &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 May 2013 08:19:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/variable-in-set-analysis/m-p/458912#M1152834</guid>
      <dc:creator />
      <dc:date>2013-05-15T08:19:17Z</dc:date>
    </item>
    <item>
      <title>Re: variable in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/variable-in-set-analysis/m-p/458913#M1152835</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To use set analysis this way you should add some field for selection. I simply added rowno.&lt;/P&gt;&lt;P&gt;[Sample Data]: &lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;LOAD&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;rowno&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;() &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;RowID&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; * &lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Inline&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then use set analysis search feature and dollar sign expansion properly to make a selection in &lt;SPAN style="color: #800000; font-size: 8pt;"&gt;RowID &lt;/SPAN&gt;field.&lt;/P&gt;&lt;P&gt;For example, for Nett expression: Only&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;RowID&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"=$(vSelectedLowPrices)=-1"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Price&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 May 2013 11:03:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/variable-in-set-analysis/m-p/458913#M1152835</guid>
      <dc:creator>whiteline</dc:creator>
      <dc:date>2013-05-15T11:03:44Z</dc:date>
    </item>
    <item>
      <title>Re: variable in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/variable-in-set-analysis/m-p/458914#M1152837</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Another way is to use calculated dimension. Just replace Comment dimension with&lt;/P&gt;&lt;P&gt;=&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;aggr&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;$(vSelectedLowPrices)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;=-1, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Comment&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;), &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Comment&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Then toggle 'Suppress when value is null' chekbox to hide rows with dashes.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Usually it's slower than set analysis, but useful when you have a lot of expressions, or want to use simple expressions.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 May 2013 11:22:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/variable-in-set-analysis/m-p/458914#M1152837</guid>
      <dc:creator>whiteline</dc:creator>
      <dc:date>2013-05-15T11:22:21Z</dc:date>
    </item>
    <item>
      <title>Re: variable in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/variable-in-set-analysis/m-p/458915#M1152838</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thankyou whiteline - you're a god send.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have recently picked up QlikView due to work and am finding it tricky (Excel is my forte).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway, just to clarify your answers, I have added them to the attached file.&amp;nbsp; I wanted to make sure there was a demo to help others and make certain I have followed you correctly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first works well but the rows remain visble but empty.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The second works a treat.&amp;nbsp; I had tried this method but had only suceeded in getting calcualtion errors &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From what I can tell aggr seem to appear alot on these forums and is a very powerful function?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your time.&lt;/P&gt;&lt;P&gt;Oli&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 May 2013 11:38:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/variable-in-set-analysis/m-p/458915#M1152838</guid>
      <dc:creator />
      <dc:date>2013-05-15T11:38:42Z</dc:date>
    </item>
    <item>
      <title>Re: variable in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/variable-in-set-analysis/m-p/458916#M1152839</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It seems that the first one doesn't work as supposed because there is an expression for BackGroundColor &lt;span class="lia-unicode-emoji" title=":grinning_face_with_big_eyes:"&gt;😃&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, aggr is very usefull. You can start by reading QlikView build-in help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 May 2013 17:04:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/variable-in-set-analysis/m-p/458916#M1152839</guid>
      <dc:creator>whiteline</dc:creator>
      <dc:date>2013-05-15T17:04:44Z</dc:date>
    </item>
  </channel>
</rss>

