<?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: Re: Set Analysis - Consider Selection in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Consider-Selection/m-p/547436#M204491</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check the result of the expression in the dollar sign expansion in a textbox:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=GetFieldSelections(Company)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are some additional arguments for GetFieldSelections functions, e.g. when coping with a lot of Companies.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's quite hard to tell what's going wrong without knowing much about your data and setting, so it is in general very helpful if you could post a small sample app.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And please add to any sample your requested results when performing some user actions, there are subtle differences in expressions to handle when e.g. asking for results when user explicitely selects values in Company field vs. possible values in Company field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've attached a small sample that might show you how you can use GetFieldSelections and GetSelectedCount when requiring an active selection in a field.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 20 Sep 2013 15:28:06 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2013-09-20T15:28:06Z</dc:date>
    <item>
      <title>Set Analysis - Consider Selection</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Consider-Selection/m-p/547433#M204488</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Folks, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the following set analysis expression on my Dashboard:&lt;/P&gt;&lt;P&gt;= 'Caixa Inicial: ' &amp;amp;&amp;nbsp; &lt;SPAN style="color: #053df5;"&gt;Money&lt;/SPAN&gt;(&lt;SPAN style="color: #053df5;"&gt;Sum&lt;/SPAN&gt;({1&amp;lt;&lt;SPAN style="color: #970c09;"&gt;Tipo&lt;/SPAN&gt;={'Caixa'},&lt;SPAN style="color: #970c09;"&gt;DateID&lt;/SPAN&gt;={&lt;SPAN style="color: #970c09;"&gt;"&amp;lt;$(=vInicioPeriodo)"&lt;/SPAN&gt;}&amp;gt;}&lt;SPAN style="color: #970c09;"&gt;[Valor Debito]&lt;/SPAN&gt;)) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This brings me the right value and by using the variable vInicioPeriodo I can do the calculations considering the dimension Month. If no month is selected, vInicioPeriodo = today, if the user select a month on filter vInicioPeriodo = last day of selected month. &lt;/P&gt;&lt;P&gt;This is working pretty well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to do now is to consider my Company dimension. I mean, by default the expression must consider the values from all companies. If the user select one or more companies on the application filter, my expression must consider only values from these companies.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any idea of how to do that ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Sep 2013 13:58:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Consider-Selection/m-p/547433#M204488</guid>
      <dc:creator>vinicius_siquei</dc:creator>
      <dc:date>2013-09-20T13:58:27Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis - Consider Selection</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Consider-Selection/m-p/547434#M204489</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;= 'Caixa Inicial: ' &amp;amp;&amp;nbsp; &lt;SPAN style="color: #053df5;"&gt;Money&lt;/SPAN&gt;(&lt;SPAN style="color: #053df5;"&gt;Sum&lt;/SPAN&gt;({1&amp;lt;Company = {$(=GetFieldSelections(Company))}, &lt;SPAN style="color: #970c09;"&gt;Tipo&lt;/SPAN&gt;={'Caixa'},&lt;SPAN style="color: #970c09;"&gt;DateID&lt;/SPAN&gt;={&lt;SPAN style="color: #970c09;"&gt;"&amp;lt;$(=vInicioPeriodo)"&lt;/SPAN&gt;}&amp;gt;}&lt;SPAN style="color: #970c09;"&gt;[Valor Debito]&lt;/SPAN&gt;))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Sep 2013 14:14:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Consider-Selection/m-p/547434#M204489</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2013-09-20T14:14:26Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis - Consider Selection</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Consider-Selection/m-p/547435#M204490</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Getting this error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Error: Error in set modifier ad hoc element list: ',' or ')' expected&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Sep 2013 15:10:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Consider-Selection/m-p/547435#M204490</guid>
      <dc:creator>vinicius_siquei</dc:creator>
      <dc:date>2013-09-20T15:10:44Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Set Analysis - Consider Selection</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Consider-Selection/m-p/547436#M204491</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check the result of the expression in the dollar sign expansion in a textbox:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=GetFieldSelections(Company)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are some additional arguments for GetFieldSelections functions, e.g. when coping with a lot of Companies.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's quite hard to tell what's going wrong without knowing much about your data and setting, so it is in general very helpful if you could post a small sample app.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And please add to any sample your requested results when performing some user actions, there are subtle differences in expressions to handle when e.g. asking for results when user explicitely selects values in Company field vs. possible values in Company field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've attached a small sample that might show you how you can use GetFieldSelections and GetSelectedCount when requiring an active selection in a field.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Sep 2013 15:28:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Consider-Selection/m-p/547436#M204491</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2013-09-20T15:28:06Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis - Consider Selection</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Consider-Selection/m-p/547437#M204492</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just solved it by using the following expression:&lt;/P&gt;&lt;H6 style="font-style: inherit; font-size: 13px; font-family: inherit;"&gt;&lt;/H6&gt;&lt;P&gt;&lt;SPAN style="color: #053df5;"&gt;Money&lt;/SPAN&gt;(&lt;SPAN style="color: #053df5;"&gt;sum&lt;/SPAN&gt;({1&amp;lt;&lt;SPAN style="color: #970c09;"&gt;Tipo&lt;/SPAN&gt;={'Caixa'}, &lt;SPAN style="color: #970c09;"&gt;DateID&lt;/SPAN&gt;={&lt;SPAN style="color: #970c09;"&gt;"&amp;lt;$(=vInicioPeriodo)"&lt;/SPAN&gt;}, &lt;SPAN style="color: #970c09;"&gt;Filial&lt;/SPAN&gt; = {'$(=GetFieldSelections(Filial))'}&amp;gt;} &lt;SPAN style="color: #970c09;"&gt;[Valor Debito]&lt;/SPAN&gt;)) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;A href="https://community.qlik.com/qlik-users/15823"&gt;swuehl&lt;/A&gt;! You gave me the clue!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Sep 2013 15:29:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Consider-Selection/m-p/547437#M204492</guid>
      <dc:creator>vinicius_siquei</dc:creator>
      <dc:date>2013-09-20T15:29:09Z</dc:date>
    </item>
  </channel>
</rss>

