<?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: Setting up external variable for chart expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Setting-up-external-variable-for-chart-expression/m-p/841904#M1001386</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kaushik,&lt;/P&gt;&lt;P&gt;Yes, the background colour portion is now working as expected.&lt;/P&gt;&lt;P&gt;Can you please suggest on the 2nd part I mentioned in the application.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// So, XXX 123 practice area &amp;amp; application, the day difference is 2 days and Threshold is 3 days , so it will be Amber (within limit)&lt;/P&gt;&lt;P&gt;// but for XXX 456 the threshold is 1 day ( it falls under 2 row of 2nd load statement.&amp;nbsp; XXX-123 threshold is 3 days . For XXX-All(anything other than 123), threshold is 1 day&lt;/P&gt;&lt;P&gt;//The reason for having All is.... threshold for 1 application is different from others belonging to the same Practice Area&lt;/P&gt;&lt;P&gt;// XXX, 123, 3&lt;/P&gt;&lt;P&gt;// XXX,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; All, 1&lt;/P&gt;&lt;P&gt;// So the color will be Red. Date difference is coming as 5 days&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There can be different threshold values for the same Practice Area (but different Applications). How to handle that?&lt;/P&gt;&lt;P&gt;For example, in the 1st Load statement&lt;/P&gt;&lt;P&gt;XXX has 3 applications 123,456,789&lt;/P&gt;&lt;P&gt;Now the threshold value for 123 is 3 days, but for remaining All (456&amp;amp;789) its 1 day.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to handle that in the expression?&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;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 07 Jun 2015 11:28:18 GMT</pubDate>
    <dc:creator>sayadutt</dc:creator>
    <dc:date>2015-06-07T11:28:18Z</dc:date>
    <item>
      <title>Setting up external variable for chart expression</title>
      <link>https://community.qlik.com/t5/QlikView/Setting-up-external-variable-for-chart-expression/m-p/841895#M1001377</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;Currently I have an expression in straight chart like :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if([Practice Area] = 'XXX' and $(vDateVar) &amp;gt; &lt;STRONG style="color: #ff0000;"&gt;5&lt;/STRONG&gt;, RGB(245, 54, 83),&lt;/P&gt;&lt;P&gt;if([Practice Area] = 'YYY' and $(vDateVar) &amp;gt; &lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;3&lt;/STRONG&gt;&lt;/SPAN&gt;,RGB(245, 54, 83),&lt;/P&gt;&lt;P&gt;red()))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now my requirement is to get rid of the hard coded values (5 &amp;amp; 3 - marked in red), and read it from an external file, may be csv.&lt;/P&gt;&lt;P&gt;My csv will look like this.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;[Practice Area], value&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;XXX, 3&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;YYY, 2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;So the qvw should read this csv, pick up the corresponding value based on Practice Area and create the expression.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;In this way if I modify the values in csv the same will be reflected in qvw without touching the chart expression.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Can you please guide me how I can read the values from an external file and use it in expression.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Thanks&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 07 Jun 2015 08:07:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Setting-up-external-variable-for-chart-expression/m-p/841895#M1001377</guid>
      <dc:creator>sayadutt</dc:creator>
      <dc:date>2015-06-07T08:07:44Z</dc:date>
    </item>
    <item>
      <title>Re: Setting up external variable for chart expression</title>
      <link>https://community.qlik.com/t5/QlikView/Setting-up-external-variable-for-chart-expression/m-p/841896#M1001378</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;Try this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;if([Practice Area] = 'XXX' and $(vDateVar) &amp;gt; &lt;STRONG style="font-style: inherit; font-family: inherit; color: #ff0000;"&gt;only({&amp;lt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;[Practice Area] = {"XXX"}&lt;/SPAN&gt;&amp;gt;}Value)&lt;/STRONG&gt;, RGB(245, 54, 83),&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;if([Practice Area] = 'YYY' and $(vDateVar) &amp;gt; &lt;STRONG style="font-family: inherit; font-size: 13px; font-style: inherit; color: #ff0000;"&gt;only({&amp;lt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;[Practice Area] = {"YYY"}&lt;/SPAN&gt;&amp;gt;}Value)&lt;/STRONG&gt;,RGB(245, 54, 83),&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;red()))&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Regards,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Kaushik Solanki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 07 Jun 2015 08:10:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Setting-up-external-variable-for-chart-expression/m-p/841896#M1001378</guid>
      <dc:creator>kaushiknsolanki</dc:creator>
      <dc:date>2015-06-07T08:10:10Z</dc:date>
    </item>
    <item>
      <title>Re: Setting up external variable for chart expression</title>
      <link>https://community.qlik.com/t5/QlikView/Setting-up-external-variable-for-chart-expression/m-p/841897#M1001379</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Kaushik,&lt;/P&gt;&lt;P&gt;Did not get this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From where are we reading the values from external file in your example?&lt;/P&gt;&lt;P&gt;don't we need to read those values first, store it somewhere and then use it in expression?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 07 Jun 2015 08:16:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Setting-up-external-variable-for-chart-expression/m-p/841897#M1001379</guid>
      <dc:creator>sayadutt</dc:creator>
      <dc:date>2015-06-07T08:16:01Z</dc:date>
    </item>
    <item>
      <title>Re: Setting up external variable for chart expression</title>
      <link>https://community.qlik.com/t5/QlikView/Setting-up-external-variable-for-chart-expression/m-p/841898#M1001380</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;You must have loaded that table in script?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If not then you need to load that data in Application.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kaushik Solanki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 07 Jun 2015 08:30:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Setting-up-external-variable-for-chart-expression/m-p/841898#M1001380</guid>
      <dc:creator>kaushiknsolanki</dc:creator>
      <dc:date>2015-06-07T08:30:50Z</dc:date>
    </item>
    <item>
      <title>Re: Setting up external variable for chart expression</title>
      <link>https://community.qlik.com/t5/QlikView/Setting-up-external-variable-for-chart-expression/m-p/841899#M1001381</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kaushik,&lt;/P&gt;&lt;P&gt;I tried, but it seems not working. I cant see the RGB colors at all.Its not even going to the else part.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;csv file:&lt;/P&gt;&lt;P&gt;Practice Area,Threshold&lt;/P&gt;&lt;P&gt;XXX,2&lt;/P&gt;&lt;P&gt;YYY,3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load statement:&lt;/P&gt;&lt;P&gt;LOAD [Practice Area],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Threshold&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;[path]&lt;/P&gt;&lt;P&gt;(txt, codepage is 1252, embedded labels, delimiter is ',', msq);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expression in Background Color section:&lt;/P&gt;&lt;P&gt;if([Practice Area] = 'XXX' and $(vDateVar) &amp;gt; only({&amp;lt;[Practice Area] = {"XXX"}&amp;gt;}Threshold), RGB(245, 54, 83),&lt;/P&gt;&lt;P&gt;if([Practice Area] = 'YYY' and $(vDateVar) &amp;gt; (only({&amp;lt;[Practice Area] = {"YYY"}&amp;gt;}Threshold)),RGB(245, 54, 83),&lt;/P&gt;&lt;P&gt;RGB(0,0,0)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it returns white colour (default colour), its not even returning the else part.&lt;/P&gt;&lt;P&gt;Is the above expression correct? Is it actually going inside the if part at all?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please suggest.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 07 Jun 2015 09:57:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Setting-up-external-variable-for-chart-expression/m-p/841899#M1001381</guid>
      <dc:creator>sayadutt</dc:creator>
      <dc:date>2015-06-07T09:57:04Z</dc:date>
    </item>
    <item>
      <title>Re: Setting up external variable for chart expression</title>
      <link>https://community.qlik.com/t5/QlikView/Setting-up-external-variable-for-chart-expression/m-p/841900#M1001382</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please share a sample file&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kaushik Solanki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 07 Jun 2015 10:12:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Setting-up-external-variable-for-chart-expression/m-p/841900#M1001382</guid>
      <dc:creator>kaushiknsolanki</dc:creator>
      <dc:date>2015-06-07T10:12:09Z</dc:date>
    </item>
    <item>
      <title>Re: Setting up external variable for chart expression</title>
      <link>https://community.qlik.com/t5/QlikView/Setting-up-external-variable-for-chart-expression/m-p/841901#M1001383</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could you share the script where you load the value into your variable &lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;EM&gt;vDateVar &lt;/EM&gt;?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For testing what happens if you hard code the value thus replacing &lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;$(vDateVar) ?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 07 Jun 2015 10:43:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Setting-up-external-variable-for-chart-expression/m-p/841901#M1001383</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-06-07T10:43:37Z</dc:date>
    </item>
    <item>
      <title>Re: Setting up external variable for chart expression</title>
      <link>https://community.qlik.com/t5/QlikView/Setting-up-external-variable-for-chart-expression/m-p/841902#M1001384</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kaushik,&lt;/P&gt;&lt;P&gt;I have tried to explain my complete requirement in the edit script section. Please have a look.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Attaching the sample.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 07 Jun 2015 10:57:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Setting-up-external-variable-for-chart-expression/m-p/841902#M1001384</guid>
      <dc:creator>sayadutt</dc:creator>
      <dc:date>2015-06-07T10:57:36Z</dc:date>
    </item>
    <item>
      <title>Re: Setting up external variable for chart expression</title>
      <link>https://community.qlik.com/t5/QlikView/Setting-up-external-variable-for-chart-expression/m-p/841903#M1001385</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;Here the problem was not expression, but it was of the variable you had created.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have made changes to script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a look at the attached application and give your feedback.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kaushik Solanki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 07 Jun 2015 11:08:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Setting-up-external-variable-for-chart-expression/m-p/841903#M1001385</guid>
      <dc:creator>kaushiknsolanki</dc:creator>
      <dc:date>2015-06-07T11:08:15Z</dc:date>
    </item>
    <item>
      <title>Re: Setting up external variable for chart expression</title>
      <link>https://community.qlik.com/t5/QlikView/Setting-up-external-variable-for-chart-expression/m-p/841904#M1001386</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kaushik,&lt;/P&gt;&lt;P&gt;Yes, the background colour portion is now working as expected.&lt;/P&gt;&lt;P&gt;Can you please suggest on the 2nd part I mentioned in the application.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// So, XXX 123 practice area &amp;amp; application, the day difference is 2 days and Threshold is 3 days , so it will be Amber (within limit)&lt;/P&gt;&lt;P&gt;// but for XXX 456 the threshold is 1 day ( it falls under 2 row of 2nd load statement.&amp;nbsp; XXX-123 threshold is 3 days . For XXX-All(anything other than 123), threshold is 1 day&lt;/P&gt;&lt;P&gt;//The reason for having All is.... threshold for 1 application is different from others belonging to the same Practice Area&lt;/P&gt;&lt;P&gt;// XXX, 123, 3&lt;/P&gt;&lt;P&gt;// XXX,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; All, 1&lt;/P&gt;&lt;P&gt;// So the color will be Red. Date difference is coming as 5 days&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There can be different threshold values for the same Practice Area (but different Applications). How to handle that?&lt;/P&gt;&lt;P&gt;For example, in the 1st Load statement&lt;/P&gt;&lt;P&gt;XXX has 3 applications 123,456,789&lt;/P&gt;&lt;P&gt;Now the threshold value for 123 is 3 days, but for remaining All (456&amp;amp;789) its 1 day.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to handle that in the expression?&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;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 07 Jun 2015 11:28:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Setting-up-external-variable-for-chart-expression/m-p/841904#M1001386</guid>
      <dc:creator>sayadutt</dc:creator>
      <dc:date>2015-06-07T11:28:18Z</dc:date>
    </item>
  </channel>
</rss>

