<?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: Looking for more elegant way of my solution - can dimension be passed as parameter to expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Looking-for-more-elegant-way-of-my-solution-can-dimension-be/m-p/965849#M331065</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Set analysis is only evaluated once per chart, not per dimension value, so you can't pass the dimension value to it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alternatively to the nested if() statements, you can use pick() function:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Pick(Ratings,&lt;/P&gt;&lt;P&gt;(count( {&amp;lt;HelpDesk= {1} &amp;gt;}&amp;nbsp; HelpDesk) + count({&amp;lt;Email={1} &amp;gt;} Email))/2,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;(count( {&amp;lt;HelpDesk= {2} &amp;gt;}&amp;nbsp; HelpDesk) + count({&amp;lt;Email={2} &amp;gt;} Email))/2,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt; (count( {&amp;lt;HelpDesk= {3} &amp;gt;}&amp;nbsp; HelpDesk) + count({&amp;lt;Email={3} &amp;gt;} Email))/2,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt; (count( {&amp;lt;HelpDesk= {4} &amp;gt;}&amp;nbsp; HelpDesk) + count({&amp;lt;Email={4} &amp;gt;} Email))/2&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; )&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 09 Nov 2015 22:42:15 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2015-11-09T22:42:15Z</dc:date>
    <item>
      <title>Looking for more elegant way of my solution - can dimension be passed as parameter to expression</title>
      <link>https://community.qlik.com/t5/QlikView/Looking-for-more-elegant-way-of-my-solution-can-dimension-be/m-p/965848#M331064</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a series of if statements in my expression where I need to calculate the average occurrence of the counts of the dimension values,&lt;/P&gt;&lt;P&gt;I'm not sure how else to do it ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(Ratings=1,(count( {&amp;lt;HelpDesk= {1} &amp;gt;}&amp;nbsp; HelpDesk) + count({&amp;lt;Email={1} &amp;gt;} Email))/2,&lt;/P&gt;&lt;P&gt;&amp;nbsp; if(Ratings=2 ,(count( {&amp;lt;HelpDesk= {2} &amp;gt;}&amp;nbsp; HelpDesk) + count({&amp;lt;Email={2} &amp;gt;} Email))/2,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(Ratings=3 ,(count( {&amp;lt;HelpDesk= {3} &amp;gt;}&amp;nbsp; HelpDesk) + count({&amp;lt;Email={3} &amp;gt;} Email))/2,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(Ratings=4 ,(count( {&amp;lt;HelpDesk= {4} &amp;gt;}&amp;nbsp; HelpDesk) + count({&amp;lt;Email={4} &amp;gt;} Email))/2,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;))))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way, via a set expression to pass the value from my dimension to my expression ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Gerry.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Nov 2015 22:17:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Looking-for-more-elegant-way-of-my-solution-can-dimension-be/m-p/965848#M331064</guid>
      <dc:creator>gerrycastellino</dc:creator>
      <dc:date>2015-11-09T22:17:13Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for more elegant way of my solution - can dimension be passed as parameter to expression</title>
      <link>https://community.qlik.com/t5/QlikView/Looking-for-more-elegant-way-of-my-solution-can-dimension-be/m-p/965849#M331065</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Set analysis is only evaluated once per chart, not per dimension value, so you can't pass the dimension value to it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alternatively to the nested if() statements, you can use pick() function:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Pick(Ratings,&lt;/P&gt;&lt;P&gt;(count( {&amp;lt;HelpDesk= {1} &amp;gt;}&amp;nbsp; HelpDesk) + count({&amp;lt;Email={1} &amp;gt;} Email))/2,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;(count( {&amp;lt;HelpDesk= {2} &amp;gt;}&amp;nbsp; HelpDesk) + count({&amp;lt;Email={2} &amp;gt;} Email))/2,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt; (count( {&amp;lt;HelpDesk= {3} &amp;gt;}&amp;nbsp; HelpDesk) + count({&amp;lt;Email={3} &amp;gt;} Email))/2,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt; (count( {&amp;lt;HelpDesk= {4} &amp;gt;}&amp;nbsp; HelpDesk) + count({&amp;lt;Email={4} &amp;gt;} Email))/2&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; )&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Nov 2015 22:42:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Looking-for-more-elegant-way-of-my-solution-can-dimension-be/m-p/965849#M331065</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-11-09T22:42:15Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for more elegant way of my solution - can dimension be passed as parameter to expression</title>
      <link>https://community.qlik.com/t5/QlikView/Looking-for-more-elegant-way-of-my-solution-can-dimension-be/m-p/965850#M331066</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;And if it's possible to remodel your main data table from a crosstable to a straight table using CROSSTABLE LOAD prefix, you can generate the Rating from your data and avoid the conditional expression evaluation completely. See attached for a sample.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Nov 2015 23:10:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Looking-for-more-elegant-way-of-my-solution-can-dimension-be/m-p/965850#M331066</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-11-09T23:10:05Z</dc:date>
    </item>
  </channel>
</rss>

