<?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: Strings in a string as a variable in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Strings-in-a-string-as-a-variable/m-p/571220#M1121198</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There are numerous ways you can define your variable. Kindly refer to the QlikView Reference Manual or Help topics.&lt;/P&gt;&lt;P&gt;Search for "Variables" in these materials and you will find the different ways of creating it and other facts about it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 27 Jan 2014 10:28:17 GMT</pubDate>
    <dc:creator>sudeepkm</dc:creator>
    <dc:date>2014-01-27T10:28:17Z</dc:date>
    <item>
      <title>Strings in a string as a variable</title>
      <link>https://community.qlik.com/t5/QlikView/Strings-in-a-string-as-a-variable/m-p/571215#M1121193</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a question to define a variable. If I want to define X as a string of formula: Variable='AAA BB C', how should I write it in the script?&lt;/P&gt;&lt;P&gt;Shall I write "Variable='AAA BB C'" as X? It seems not correct...Anyone can help?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jan 2014 09:48:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Strings-in-a-string-as-a-variable/m-p/571215#M1121193</guid>
      <dc:creator />
      <dc:date>2014-01-27T09:48:00Z</dc:date>
    </item>
    <item>
      <title>Re: Strings in a string as a variable</title>
      <link>https://community.qlik.com/t5/QlikView/Strings-in-a-string-as-a-variable/m-p/571216#M1121194</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;&lt;BR /&gt;&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;BR /&gt;&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;Set YourVariable='AAA BB C'&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;BR /&gt;&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;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jan 2014 09:50:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Strings-in-a-string-as-a-variable/m-p/571216#M1121194</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-01-27T09:50:00Z</dc:date>
    </item>
    <item>
      <title>Re: Strings in a string as a variable</title>
      <link>https://community.qlik.com/t5/QlikView/Strings-in-a-string-as-a-variable/m-p/571217#M1121195</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Let vString='&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;AAA BB C&lt;/SPAN&gt;'&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jan 2014 09:58:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Strings-in-a-string-as-a-variable/m-p/571217#M1121195</guid>
      <dc:creator>sujeetsingh</dc:creator>
      <dc:date>2014-01-27T09:58:08Z</dc:date>
    </item>
    <item>
      <title>Re: Strings in a string as a variable</title>
      <link>https://community.qlik.com/t5/QlikView/Strings-in-a-string-as-a-variable/m-p/571218#M1121196</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you want to assign value &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;EM&gt;Variable='AAA BB C'&lt;/EM&gt;&lt;/SPAN&gt; to variable X, you can write &lt;/P&gt;&lt;P&gt;SET X = &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Variable='AAA BB C'; &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;in load script, &lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 10pt; line-height: 1.5em;"&gt;or add new variable in Variable Overview and assign defenition &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;EM&gt;Variable='AAA BB C'&lt;/EM&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5em; color: #3d3d3d; font-size: 10pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;(without equal sign)&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jan 2014 10:01:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Strings-in-a-string-as-a-variable/m-p/571218#M1121196</guid>
      <dc:creator />
      <dc:date>2014-01-27T10:01:25Z</dc:date>
    </item>
    <item>
      <title>Re: Strings in a string as a variable</title>
      <link>https://community.qlik.com/t5/QlikView/Strings-in-a-string-as-a-variable/m-p/571219#M1121197</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;&lt;STRONG&gt;&lt;STRONG style="color: #0000ff; font-size: 10pt;"&gt;&lt;STRONG style="color: #0000ff; font-size: 10pt;"&gt;&amp;nbsp; &lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;let &lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: #808080; font-size: 10pt;"&gt;&lt;STRONG&gt;&lt;EM style="color: #808080; font-size: 10pt;"&gt;MaVar&lt;/EM&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt; = 'A given text string';&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #0000ff; font-size: 10pt;"&gt;&lt;STRONG style="color: #0000ff; font-size: 10pt;"&gt;set&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: #808080; font-size: 10pt;"&gt;&lt;STRONG&gt;&lt;EM style="color: #808080; font-size: 10pt;"&gt;X&lt;/EM&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt; = '=MaVar'; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;MaVar is a string. X is a formula that is = to MaVar. If you change the content of MaVar, you will change X.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;As you may see, I used either let (a string) or set (a formula)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Fabrice&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jan 2014 10:11:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Strings-in-a-string-as-a-variable/m-p/571219#M1121197</guid>
      <dc:creator />
      <dc:date>2014-01-27T10:11:19Z</dc:date>
    </item>
    <item>
      <title>Re: Strings in a string as a variable</title>
      <link>https://community.qlik.com/t5/QlikView/Strings-in-a-string-as-a-variable/m-p/571220#M1121198</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There are numerous ways you can define your variable. Kindly refer to the QlikView Reference Manual or Help topics.&lt;/P&gt;&lt;P&gt;Search for "Variables" in these materials and you will find the different ways of creating it and other facts about it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jan 2014 10:28:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Strings-in-a-string-as-a-variable/m-p/571220#M1121198</guid>
      <dc:creator>sudeepkm</dc:creator>
      <dc:date>2014-01-27T10:28:17Z</dc:date>
    </item>
    <item>
      <title>Re: Strings in a string as a variable</title>
      <link>https://community.qlik.com/t5/QlikView/Strings-in-a-string-as-a-variable/m-p/571221#M1121199</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks guys! what I want to do is to define this formula as a variable in load script, and then, use it in the layout for certain conditions, like the example below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In load script:&lt;/P&gt;&lt;P&gt;load A, B, C, 'variables='total asset' or variables='net income'' as X; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in layout:&lt;/P&gt;&lt;P&gt;create a demension: if(X,1,0)&amp;nbsp;&amp;nbsp; =====&amp;gt; I want the result to be if(variables='total asset' or variables='net income',1,0)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know they have syntax error, but just want you to understand what I want to do here...I want it this way since I only need to change the defintion of X in load script without changing the layout anymore. This will make the result dynamic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Will this method work well? How to fix the syntax errors? or any other suggestions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jan 2014 14:10:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Strings-in-a-string-as-a-variable/m-p/571221#M1121199</guid>
      <dc:creator />
      <dc:date>2014-01-27T14:10:22Z</dc:date>
    </item>
    <item>
      <title>Re: Strings in a string as a variable</title>
      <link>https://community.qlik.com/t5/QlikView/Strings-in-a-string-as-a-variable/m-p/571222#M1121200</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, You can create a variable in the Load statement. I am assuming the total_asset &amp;amp; net_income are fields in the table then please try like below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let vVariable&amp;nbsp; = 1000 ; //if the value is string you need to use single quotes&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD A, B , C , total_asset , net_income ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF(total_asset= $(vVariable) or net_incomce=$(vVariable) , 1, 0) AS Income_FLag //If the variable is string, use like '$(vVaribale)'&lt;/P&gt;&lt;P&gt;From source ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use directly Income_Flag as dimension in the chart&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jan 2014 14:28:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Strings-in-a-string-as-a-variable/m-p/571222#M1121200</guid>
      <dc:creator />
      <dc:date>2014-01-27T14:28:10Z</dc:date>
    </item>
    <item>
      <title>Re: Strings in a string as a variable</title>
      <link>https://community.qlik.com/t5/QlikView/Strings-in-a-string-as-a-variable/m-p/571223#M1121201</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, thanks for your reply! I think your answer is getting close to what I want, however the thing is that I would like to obtain &amp;lt;variables='total assets' or variables='net income'&amp;gt; as a string for X in load script, it's not to see if the two variables equal certain values...I'm not going to put the if condition here because I was creating a cross table(variables,value), so I cannot use 'variables' directly in the load script...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure if I stated this issue clearly...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your patience!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;在 2014-1-27，22:29，"dathu.qv" &amp;lt;qcwebmaster@qlik.com&amp;gt; 写道：&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE level="1"&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;QlikCommunity&lt;/P&gt;&lt;P&gt;Strings in a string as a variable&lt;/P&gt;&lt;P&gt;reply from dathu.qv in New to QlikView - View the full discussion&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi, You can create a variable in the Load statement. I am assuming the total_asset &amp;amp; net_income are fields in the table then please try like below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let vVariable  = 1000 ; //if the value is string you need to use single quotes&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD A, B , C , total_asset , net_income ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         IF(total_asset= $(vVariable) or net_incomce=$(vVariable) , 1, 0) AS Income_FLag //If the variable is string, use like '$(vVaribale)'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From source ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use directly Income_Flag as dimension in the chart&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reply to this message by replying to this email, or go to the message on QlikCommunity&lt;/P&gt;&lt;P&gt;Start a new discussion in New to QlikView by email or at QlikCommunity&lt;/P&gt;&lt;P&gt;Following Strings in a string as a variable in these streams: Inbox&lt;/P&gt;&lt;P&gt;© 1993-2014 QlikTech International AB     Copyright &amp;amp; Trademarks | Privacy | Terms of Use | Software EULA&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jan 2014 15:35:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Strings-in-a-string-as-a-variable/m-p/571223#M1121201</guid>
      <dc:creator />
      <dc:date>2014-01-27T15:35:49Z</dc:date>
    </item>
  </channel>
</rss>

