<?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: Line Style change based on user selection in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Line-Style-change-based-on-user-selection/m-p/536519#M548757</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;IF(Count(total {$}LineNumberPatientID_Combined)&amp;lt;50,'&amp;lt;W2&amp;gt;','&amp;lt;W8&amp;gt;')&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 21 Jan 2014 18:40:01 GMT</pubDate>
    <dc:creator>Clever_Anjos</dc:creator>
    <dc:date>2014-01-21T18:40:01Z</dc:date>
    <item>
      <title>Line Style change based on user selection</title>
      <link>https://community.qlik.com/t5/QlikView/Line-Style-change-based-on-user-selection/m-p/536515#M548753</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;I have a line chart. Depending on the users selection sometimes the lines are two thin to really see, but when there are a huge number of lines if they are any thickier they will obscure the content. Therefore what I really want to do is have a line style of 0.2 if the Distinct count of a specific field (LineNumberPatientID_Combined) is less than 50. I have been trying to achieve this with the following formula:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF(Count({$}LineNumberPatientID_Combined)&amp;lt;50,'&amp;lt;W2&amp;gt;','&amp;lt;W8&amp;gt;')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This doesn't seem to achieve what I wanted, regardless of the selection it appears to always use W2. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any guidance would be greatly appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Dan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jan 2014 12:20:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Line-Style-change-based-on-user-selection/m-p/536515#M548753</guid>
      <dc:creator />
      <dc:date>2014-01-20T12:20:43Z</dc:date>
    </item>
    <item>
      <title>Re: Line Style change based on user selection</title>
      <link>https://community.qlik.com/t5/QlikView/Line-Style-change-based-on-user-selection/m-p/536516#M548754</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;Does &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Count(LineNumberPatientID_Combined) return a value for each column? Add that as an expression to your chart to ensure that evaluates properly and is in the range you expect.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jan 2014 12:31:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Line-Style-change-based-on-user-selection/m-p/536516#M548754</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2014-01-20T12:31:17Z</dc:date>
    </item>
    <item>
      <title>Re: Line Style change based on user selection</title>
      <link>https://community.qlik.com/t5/QlikView/Line-Style-change-based-on-user-selection/m-p/536517#M548755</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the suggestion. I have added &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Count(LineNumberPatientID_Combined) as an expression. I have checked that the total is sometimes above and sometimes below 50. However with my current Line Style formula I still only get the first value (W2) regardless of the user selection.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jan 2014 12:38:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Line-Style-change-based-on-user-selection/m-p/536517#M548755</guid>
      <dc:creator />
      <dc:date>2014-01-20T12:38:38Z</dc:date>
    </item>
    <item>
      <title>Re: Line Style change based on user selection</title>
      <link>https://community.qlik.com/t5/QlikView/Line-Style-change-based-on-user-selection/m-p/536518#M548756</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;Daniel&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would this suffice ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =IF(GetPossibleCount ( [&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;LineNumberPatientID_Combined&lt;/SPAN&gt;] ) &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&amp;lt;50&lt;/SPAN&gt; , '&amp;lt;W2&amp;gt;' , '&amp;lt;W8&amp;gt;')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;Bill&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jan 2014 18:35:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Line-Style-change-based-on-user-selection/m-p/536518#M548756</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-01-21T18:35:32Z</dc:date>
    </item>
    <item>
      <title>Re: Line Style change based on user selection</title>
      <link>https://community.qlik.com/t5/QlikView/Line-Style-change-based-on-user-selection/m-p/536519#M548757</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;IF(Count(total {$}LineNumberPatientID_Combined)&amp;lt;50,'&amp;lt;W2&amp;gt;','&amp;lt;W8&amp;gt;')&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jan 2014 18:40:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Line-Style-change-based-on-user-selection/m-p/536519#M548757</guid>
      <dc:creator>Clever_Anjos</dc:creator>
      <dc:date>2014-01-21T18:40:01Z</dc:date>
    </item>
    <item>
      <title>Re: Line Style change based on user selection</title>
      <link>https://community.qlik.com/t5/QlikView/Line-Style-change-based-on-user-selection/m-p/536520#M548758</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks everyone for your help. Bill and Clevere Anjos suggestion both work perfectly thank you. I was just curious on a couple of points. Is it better to use Set Analysis or an IF statement for this task? Does it matter?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In addition my actual requirements are slightly more complicated as I want any lines with a backflow to also be dotted (but the width should be reflective of the count). I have taken Bill's example and added the tweaks I needed resulting in the following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=&lt;/P&gt;&lt;P&gt;IF(GetPossibleCount ( [LineNumberPatientID_Combined] ) &amp;lt;50 AND FlowDirection = 'Backwards' , '&amp;lt;S2&amp;gt;&amp;lt;W2&amp;gt;' , &lt;/P&gt;&lt;P&gt;IF(GetPossibleCount ( [LineNumberPatientID_Combined] ) &amp;lt;50,'&amp;lt;W2&amp;gt;' ,&lt;/P&gt;&lt;P&gt;IF(GetPossibleCount ( [LineNumberPatientID_Combined] ) &amp;gt;=50 AND FlowDirection = 'Backwards' , '&amp;lt;S2&amp;gt;&amp;lt;W0.2&amp;gt;',&lt;/P&gt;&lt;P&gt;'&amp;lt;W0.2&amp;gt;')))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It works perfectly (thank you for your help guys) however I was just wondering if there is any way I should/could get rid of the nested IF statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jan 2014 10:00:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Line-Style-change-based-on-user-selection/m-p/536520#M548758</guid>
      <dc:creator />
      <dc:date>2014-01-22T10:00:20Z</dc:date>
    </item>
    <item>
      <title>Re: Line Style change based on user selection</title>
      <link>https://community.qlik.com/t5/QlikView/Line-Style-change-based-on-user-selection/m-p/536521#M548759</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;Daniel&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your questions are very valid.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Calculated Dimensions can cause performance issues as they are recalculated every time any Selections are changed, whether or not the object in question is active or not.&amp;nbsp; However this IF statement is not a Calculated Dimension per se, but is an expression related to the Dimension's display attributes.&amp;nbsp; I have no idea whether this is good or bad for performance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However I cannot see that the &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;EM&gt;GetPossibleCount ( [LineNumberPatientID_Combined] )&lt;/EM&gt;&lt;/SPAN&gt; in the IF will be resource hungry.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the Set Analysis &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;EM&gt;Count(total {$}LineNumberPatientID_Combined)&lt;/EM&gt;&lt;/SPAN&gt; similarly I do not believe that would be resource hungry either and Set Analysis is generally an efficient way of doing things.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I think it is pretty much of a muchness as to which way you go.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I personally see nothing wrong with using a nested IF, indeed I cannot think of an alternative.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would be very interested to hear the view of&lt;STRONG style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt; &lt;A href="https://community.qlik.com/people/cleveranjos"&gt;cleveranjos&lt;/A&gt;&lt;/STRONG&gt; on this, as he certainly has more experience than I.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;Bill&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jan 2014 10:37:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Line-Style-change-based-on-user-selection/m-p/536521#M548759</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-01-22T10:37:52Z</dc:date>
    </item>
    <item>
      <title>Re: Line Style change based on user selection</title>
      <link>https://community.qlik.com/t5/QlikView/Line-Style-change-based-on-user-selection/m-p/536522#M548760</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This nested IF could hard to mantain, but not very resource intensive.&lt;/P&gt;&lt;P&gt;I don´t see an easy way of get rid of this, because they´re 'different' tests, not just a a bucket we should calculate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-users/76197"&gt;Bill Markham&lt;/A&gt;, we´re colleagues here, my friend, I think we´re at the same level &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt; &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, 22 Jan 2014 11:05:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Line-Style-change-based-on-user-selection/m-p/536522#M548760</guid>
      <dc:creator>Clever_Anjos</dc:creator>
      <dc:date>2014-01-22T11:05:40Z</dc:date>
    </item>
  </channel>
</rss>

