<?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: Place comma separated string value from Excel in a QlikView variable in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Place-comma-separated-string-value-from-Excel-in-a-QlikView/m-p/463058#M488400</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Gysbert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the Navision database the values are seperated per row.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The table in NAV looks like this;&lt;/P&gt;&lt;P&gt;Code&lt;/P&gt;&lt;P&gt;TT115&lt;/P&gt;&lt;P&gt;TT330&lt;/P&gt;&lt;P&gt;TT456&lt;/P&gt;&lt;P&gt;Etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I created a seperated Excel sheet where the customer can add specific settings. One of the settings are to indicated what kind off Reason Codes are Internal codes.&lt;/P&gt;&lt;P&gt;The Excel file looks like&lt;/P&gt;&lt;P&gt;ID&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Name&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Value&lt;/P&gt;&lt;P&gt;4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; InternalTTCodes&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TT115, TT330, TT456, Etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the load script I use the Peek function to fill the the variable like this&lt;/P&gt;&lt;P&gt;LET vInternalTT = Peek('ExcelSetupValue', 4, 'ExcelSetup');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In a chart expression I want to use the Value in a SET ANALYSIS like this.&lt;/P&gt;&lt;P&gt;=Sum({&amp;lt;ReasonCode = {'$(vInternalTT)'}&amp;gt;} VESalesAmountActual)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I ensure that I can use the external excel setup file where I can fill in the reason codes and retrieve them through a variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thx for your help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 23 Dec 2012 20:14:55 GMT</pubDate>
    <dc:creator>jjordaan</dc:creator>
    <dc:date>2012-12-23T20:14:55Z</dc:date>
    <item>
      <title>Place comma separated string value from Excel in a QlikView variable</title>
      <link>https://community.qlik.com/t5/QlikView/Place-comma-separated-string-value-from-Excel-in-a-QlikView/m-p/463056#M488398</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a question and I think it should be very simple.&lt;/P&gt;&lt;P&gt;I am developing a dashboard based on a Navision database.&lt;/P&gt;&lt;P&gt;Some settings for the dashboard I place in an Excel file which I then load up in the script. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the Excel file I have 3 columns ID, Name and Value.&lt;/P&gt;&lt;P&gt;The ID = 4, Name = InternalTTCodes, Values ​​= TT115, TT330, TT365, TT400 etc. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the script I created a variable with a Peek function;&lt;/P&gt;&lt;P&gt;LET vInternalTT = Peek('ExcelSetupValue', 4, 'ExcelSetup'); &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I created a textbox with the variable like this = vInternalTT I retrieve the values​​.&lt;/P&gt;&lt;P&gt;Ony When I created a Set Analysis like this;&lt;/P&gt;&lt;P&gt;=Sum({&amp;lt;ReasonCode = {'$(vInternalTT)'}&amp;gt;} VESalesAmountActual) &lt;/P&gt;&lt;P&gt;I retrieve the value 0. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can some help me with this issue. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 23 Dec 2012 11:44:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Place-comma-separated-string-value-from-Excel-in-a-QlikView/m-p/463056#M488398</guid>
      <dc:creator>jjordaan</dc:creator>
      <dc:date>2012-12-23T11:44:38Z</dc:date>
    </item>
    <item>
      <title>Re: Place comma separated string value from Excel in a QlikView variable</title>
      <link>https://community.qlik.com/t5/QlikView/Place-comma-separated-string-value-from-Excel-in-a-QlikView/m-p/463057#M488399</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Does the ReasonCode field also contain comma separated values? Are you expecting ReasonCode = {'&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;TT115, TT330, TT365, TT400&lt;/SPAN&gt;'} or ReasonCode ={'&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;TT115', 'TT330', 'TT365', 'TT400&lt;/SPAN&gt;'}? The first is what you're getting. If you need the second you could split the Values field with the subfield function so you get a record for every value in the string and rename it to ReasonCode so it's associated the the other ReasonCode field. You can then use ID and Name in your set analysis expression instead to select the correct ReasonCodes.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 23 Dec 2012 16:32:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Place-comma-separated-string-value-from-Excel-in-a-QlikView/m-p/463057#M488399</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2012-12-23T16:32:08Z</dc:date>
    </item>
    <item>
      <title>Re: Place comma separated string value from Excel in a QlikView variable</title>
      <link>https://community.qlik.com/t5/QlikView/Place-comma-separated-string-value-from-Excel-in-a-QlikView/m-p/463058#M488400</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Gysbert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the Navision database the values are seperated per row.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The table in NAV looks like this;&lt;/P&gt;&lt;P&gt;Code&lt;/P&gt;&lt;P&gt;TT115&lt;/P&gt;&lt;P&gt;TT330&lt;/P&gt;&lt;P&gt;TT456&lt;/P&gt;&lt;P&gt;Etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I created a seperated Excel sheet where the customer can add specific settings. One of the settings are to indicated what kind off Reason Codes are Internal codes.&lt;/P&gt;&lt;P&gt;The Excel file looks like&lt;/P&gt;&lt;P&gt;ID&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Name&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Value&lt;/P&gt;&lt;P&gt;4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; InternalTTCodes&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TT115, TT330, TT456, Etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the load script I use the Peek function to fill the the variable like this&lt;/P&gt;&lt;P&gt;LET vInternalTT = Peek('ExcelSetupValue', 4, 'ExcelSetup');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In a chart expression I want to use the Value in a SET ANALYSIS like this.&lt;/P&gt;&lt;P&gt;=Sum({&amp;lt;ReasonCode = {'$(vInternalTT)'}&amp;gt;} VESalesAmountActual)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I ensure that I can use the external excel setup file where I can fill in the reason codes and retrieve them through a variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thx for your help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 23 Dec 2012 20:14:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Place-comma-separated-string-value-from-Excel-in-a-QlikView/m-p/463058#M488400</guid>
      <dc:creator>jjordaan</dc:creator>
      <dc:date>2012-12-23T20:14:55Z</dc:date>
    </item>
    <item>
      <title>Re: Place comma separated string value from Excel in a QlikView variable</title>
      <link>https://community.qlik.com/t5/QlikView/Place-comma-separated-string-value-from-Excel-in-a-QlikView/m-p/463059#M488401</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jeroen,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think I understand your setup now. You need the codes in the Value field in the excel sheet enclosed in single quotes. One way is to make the users put in the single quotes. Another way is to put in the quotes in the script&lt;/P&gt;&lt;P&gt;chr(39) &amp;amp; replace(replace(Value,' ',''),',', chr(39)&amp;amp;','&amp;amp;chr(39)) &amp;amp; chr(39) as Value. This is a more user friendly option.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You also need to remove the quotes in the set expression:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;=Sum({&amp;lt;ReasonCode = {$(vInternalTT)}&amp;gt;} VESalesAmountActual)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Dec 2012 09:06:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Place-comma-separated-string-value-from-Excel-in-a-QlikView/m-p/463059#M488401</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2012-12-24T09:06:10Z</dc:date>
    </item>
    <item>
      <title>Re: Place comma separated string value from Excel in a QlikView variable</title>
      <link>https://community.qlik.com/t5/QlikView/Place-comma-separated-string-value-from-Excel-in-a-QlikView/m-p/463060#M488402</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Gysbert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thx for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I add a sample Excel and QVW file where I used your suggestion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you check if there is a better way to do like I did?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thx again for the help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Dec 2012 10:50:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Place-comma-separated-string-value-from-Excel-in-a-QlikView/m-p/463060#M488402</guid>
      <dc:creator>jjordaan</dc:creator>
      <dc:date>2012-12-24T10:50:46Z</dc:date>
    </item>
    <item>
      <title>Re: Place comma separated string value from Excel in a QlikView variable</title>
      <link>https://community.qlik.com/t5/QlikView/Place-comma-separated-string-value-from-Excel-in-a-QlikView/m-p/463061#M488403</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would use bookmarks where at all possible. These are very easy for users to work with. When enabled on the server it's also possible to let users create and share bookmarks. Using bookmarks may not always be possible, like where you need set expressions to specifically exclude/include values independent of selections. Using an external file to create variables will work. It's up to you to decide if it's worth the effort or if manually adding the variables and modify the expressions is less work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With regards your load script. You could use an if statement to leave out the InternalReasonCodes table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Setup:&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ID, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Setup, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(ID=4,Chr(39) &amp;amp; Replace(Replace(Value,' ',''),',',Chr(39) &amp;amp;','&amp;amp;Chr(39)) &amp;amp; Chr(39),Value) as Value&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;[Control File .xlsx]&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is Setup);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET vInternalTT&amp;nbsp; =&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Peek('Value', 4, 'Setup');&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Dec 2012 12:28:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Place-comma-separated-string-value-from-Excel-in-a-QlikView/m-p/463061#M488403</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2012-12-24T12:28:41Z</dc:date>
    </item>
    <item>
      <title>Re: Place comma separated string value from Excel in a QlikView variable</title>
      <link>https://community.qlik.com/t5/QlikView/Place-comma-separated-string-value-from-Excel-in-a-QlikView/m-p/463062#M488404</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Gysbert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again for your tremendous help!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Dec 2012 12:45:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Place-comma-separated-string-value-from-Excel-in-a-QlikView/m-p/463062#M488404</guid>
      <dc:creator>jjordaan</dc:creator>
      <dc:date>2012-12-24T12:45:30Z</dc:date>
    </item>
  </channel>
</rss>

