<?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: Conditional calculation for expressions in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Conditional-calculation-for-expressions/m-p/551174#M479916</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Those were all very helpfull hints thank you. I'm going to mark my answer as the correct as this is what led to the solution;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;=subStringCount&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;concat&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Expr_ID_m&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,'|'),'A') &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;and&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; (&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;GetSelectedCount&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;_expr_m&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)&amp;gt; 0) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;So 2 things:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;getselectedcount was for the actual selection, which was done on the field _expr_m&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;and it has to pass the test &amp;gt;0.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;EDIT:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Sean has made a good point: You don't need to test against &amp;gt; 0.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Sorry I can't mark it usefull after the question is marked as answered but that is a very good point.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 07 Jan 2014 21:10:44 GMT</pubDate>
    <dc:creator>sibrulotte</dc:creator>
    <dc:date>2014-01-07T21:10:44Z</dc:date>
    <item>
      <title>Conditional calculation for expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-calculation-for-expressions/m-p/551171#M479913</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, so I built myself a sandbox.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;using this tutorial:&lt;/P&gt;&lt;P&gt;&lt;A href="http://livingqlikview.blogspot.ca/2012/01/conditional-dimensions-and-expressions.html"&gt;http://livingqlikview.blogspot.ca/2012/01/conditional-dimensions-and-expressions.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All expressions are built in the pivot I want to show, and I'm using this expression in the conditional calculation of expressions:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;=&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;subStringCount&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;concat&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Expr_ID_m&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,'|'),'A') &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Concurrently, I have a table loaded inline table that has two fields:&lt;/P&gt;&lt;P&gt;Expr_m, and Expr_ID_m&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A listbox of Expr_m gives me what expression I'd like to show.&lt;/P&gt;&lt;P&gt;It works great. But if there is no selection in thaat field... ALL expressions in the pivot show up.&lt;/P&gt;&lt;P&gt;That is a problem. I initially just made a condition on the pivot to show only if there was at least one selection done on Expr_m.&lt;/P&gt;&lt;P&gt;that works great. But I'm up to a point where I have to many expressions to show in one single listbox, I want to segregate into multiple list boxes. &lt;/P&gt;&lt;P&gt;Expressions for monthly, trimestre, semestre, and YTD.&lt;/P&gt;&lt;P&gt;The work around I found was an extra line in my load inline tables that read EMPTY, with an ID that doesn't match anything, with an automatic selection on these values on sheet activation. THAT IS UGLY.&lt;/P&gt;&lt;P&gt;There must be a better way to limit the expressions shown if I am using multiple listboxes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope I was clear enough. I can't upload my data, but if I get really stuck, I'll try to do a mockup for this forum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jan 2014 20:32:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-calculation-for-expressions/m-p/551171#M479913</guid>
      <dc:creator>sibrulotte</dc:creator>
      <dc:date>2014-01-03T20:32:28Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional calculation for expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-calculation-for-expressions/m-p/551172#M479914</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Simon&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what about adding an and condition to conditional dimension? &lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;= &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #0000ff;"&gt;subStringCount&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #0000ff;"&gt;concat&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #800000;"&gt;Expr_ID_m&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;,'|'),'A')&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;and GetSelectedCount([&lt;SPAN style="color: #800000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 10.909090995788574px;"&gt;Expr_ID_m&lt;/SPAN&gt;])&amp;gt; 0, 1, 0)&amp;nbsp; &lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 Jan 2014 22:39:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-calculation-for-expressions/m-p/551172#M479914</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2014-01-04T22:39:27Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional calculation for expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-calculation-for-expressions/m-p/551173#M479915</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Hi Simon, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Massimo's code can be simplified to following. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;= &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #0000ff;"&gt;subStringCount&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #0000ff;"&gt;concat&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #800000;"&gt;Expr_ID_m&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;,'|'),'A')&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;and GetSelectedCount([&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.909090995788574px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;Expr_ID_m&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;])&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And, this should also work. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Match('A', $(=Concat(distinct total chr(39)&amp;amp;&lt;SPAN style="color: #800000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 11px;"&gt;Expr_ID_m&lt;/SPAN&gt;&amp;amp;chr(39), ','))) and GetSelectedCount(&lt;SPAN style="color: #800000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 11px;"&gt;Expr_ID_m&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sean&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 05 Jan 2014 02:11:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-calculation-for-expressions/m-p/551173#M479915</guid>
      <dc:creator />
      <dc:date>2014-01-05T02:11:38Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional calculation for expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-calculation-for-expressions/m-p/551174#M479916</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Those were all very helpfull hints thank you. I'm going to mark my answer as the correct as this is what led to the solution;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;=subStringCount&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;concat&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Expr_ID_m&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,'|'),'A') &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;and&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; (&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;GetSelectedCount&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;_expr_m&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)&amp;gt; 0) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;So 2 things:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;getselectedcount was for the actual selection, which was done on the field _expr_m&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;and it has to pass the test &amp;gt;0.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;EDIT:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Sean has made a good point: You don't need to test against &amp;gt; 0.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Sorry I can't mark it usefull after the question is marked as answered but that is a very good point.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jan 2014 21:10:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-calculation-for-expressions/m-p/551174#M479916</guid>
      <dc:creator>sibrulotte</dc:creator>
      <dc:date>2014-01-07T21:10:44Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional calculation for expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-calculation-for-expressions/m-p/551175#M479917</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;You don't need to test the condition.&amp;nbsp; As long as the GetSelectedCount is not Zero, any number will pass.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jan 2014 21:55:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-calculation-for-expressions/m-p/551175#M479917</guid>
      <dc:creator />
      <dc:date>2014-01-07T21:55:40Z</dc:date>
    </item>
  </channel>
</rss>

