<?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: Variable expansion, quotes and equal sign in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Variable-expansion-quotes-and-equal-sign/m-p/1231025#M24042</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, so I'm making progress. I think I understand this much (there is a follow-up question below):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the dimension definition: &lt;STRONG&gt;='$(vTest2)'&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The equal sign tells Qlik that it's an expression to be evaluation, not just text.&lt;/LI&gt;&lt;LI&gt;The single quotes tell Qlik to treat what's inside as a literal string, not a field name.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then for the variable: &lt;STRONG style="color: #3d3d3d; font-family: inherit; font-size: 13px; font-style: inherit;"&gt;SET vTest2= =Concat(location, ', ');&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The scope of the equals sign does not carry into variables. Qlik assumes anything within $() is just text.&lt;/LI&gt;&lt;LI&gt;To get Qlik to evaluate the expression, we need to add the equal sign within the variable.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=====================================&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FOLLOW-UP QUESTION&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;How can I make this work without any variable or dollar-sign expansion? I've tried defining my dimension as:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;='Concat(location, ', ')'&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;='=Concat(location, ', ')'&lt;/STRONG&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;But neither of those work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can do it without the variable by defining the dimension like this:&lt;STRONG&gt; ='$(=Concat(location, ', '))'&lt;/STRONG&gt;, but why do I need dollar-sign expansion if I have no variable?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Tanya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 11 Nov 2016 14:01:36 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2016-11-11T14:01:36Z</dc:date>
    <item>
      <title>Variable expansion, quotes and equal sign</title>
      <link>https://community.qlik.com/t5/App-Development/Variable-expansion-quotes-and-equal-sign/m-p/1231021#M24038</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;I have figured how to do what I want, but I don't completely understand how it is working. If there's anyone out there who understands this, I would love for you to explain it to me and let me know if there is any other way to accomplish the same result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG&gt;sample_table1:&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG&gt;LOAD * INLINE [&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG&gt;&amp;nbsp; location&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG&gt;&amp;nbsp; siteA&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG&gt;&amp;nbsp; siteB&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG&gt;&amp;nbsp; siteC&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG&gt;&amp;nbsp; siteD&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG&gt;];&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG&gt;SET vTest2= =Concat(location, ', ');&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then in my report I have a table with dimension of &lt;STRONG&gt;='$(vTest2)'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Which give the result of&lt;STRONG&gt; siteA, siteB, siteC, siteD&lt;/STRONG&gt; (or whichever of these are selected)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(I need it to be a table dimension because in my real app, I need to display it as a URL, and my understanding is that only table dimensions can be clickable URLs)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why do I need the equal sign in the table dimension? This blog post (&lt;A href="https://community.qlik.com/qlik-blogpost/3996" target="_blank"&gt;The Little Equals Sign&lt;/A&gt;) says that data can be interpreted as expression or text, and the default varies for different objects.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;If the table dimension is looking for an expression, we do we need the equal sign? Why doesn't &lt;STRONG&gt;'$(vTest2)'&lt;/STRONG&gt; work?&lt;/LI&gt;&lt;LI&gt;If the table dimension is looking for text, why do we need the equal sign and quotes? Shouldn't the equal sign in the variable itself be sufficient to trigger the calculation? Why doesn't &lt;STRONG&gt;$(vTest2)&lt;/STRONG&gt; work?&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Tanya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Nov 2024 10:15:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Variable-expansion-quotes-and-equal-sign/m-p/1231021#M24038</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T10:15:44Z</dc:date>
    </item>
    <item>
      <title>Re: Variable expansion, quotes and equal sign</title>
      <link>https://community.qlik.com/t5/App-Development/Variable-expansion-quotes-and-equal-sign/m-p/1231022#M24039</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have no idea about why. I've seen a lot of strange thing in Sense...&lt;/P&gt;&lt;P&gt;In the official help page, it just says so:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.qlik.com/en-US/sense/3.1/Subsystems/Hub/Content/Dimensions/create-calculated-dimension.htm" title="http://help.qlik.com/en-US/sense/3.1/Subsystems/Hub/Content/Dimensions/create-calculated-dimension.htm"&gt;Creating a calculated dimension ‒ Qlik Sense&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/143616_pastedImage_1.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Nov 2016 02:39:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Variable-expansion-quotes-and-equal-sign/m-p/1231022#M24039</guid>
      <dc:creator>NZFei</dc:creator>
      <dc:date>2016-11-11T02:39:54Z</dc:date>
    </item>
    <item>
      <title>Re: Variable expansion, quotes and equal sign</title>
      <link>https://community.qlik.com/t5/App-Development/Variable-expansion-quotes-and-equal-sign/m-p/1231023#M24040</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is the qliksense version you are using?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Nov 2016 03:34:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Variable-expansion-quotes-and-equal-sign/m-p/1231023#M24040</guid>
      <dc:creator>shraddha_g</dc:creator>
      <dc:date>2016-11-11T03:34:20Z</dc:date>
    </item>
    <item>
      <title>Re: Variable expansion, quotes and equal sign</title>
      <link>https://community.qlik.com/t5/App-Development/Variable-expansion-quotes-and-equal-sign/m-p/1231024#M24041</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Version 2.2 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is the behaviour different in more recent versions?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Nov 2016 13:13:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Variable-expansion-quotes-and-equal-sign/m-p/1231024#M24041</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-11-11T13:13:52Z</dc:date>
    </item>
    <item>
      <title>Re: Variable expansion, quotes and equal sign</title>
      <link>https://community.qlik.com/t5/App-Development/Variable-expansion-quotes-and-equal-sign/m-p/1231025#M24042</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, so I'm making progress. I think I understand this much (there is a follow-up question below):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the dimension definition: &lt;STRONG&gt;='$(vTest2)'&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The equal sign tells Qlik that it's an expression to be evaluation, not just text.&lt;/LI&gt;&lt;LI&gt;The single quotes tell Qlik to treat what's inside as a literal string, not a field name.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then for the variable: &lt;STRONG style="color: #3d3d3d; font-family: inherit; font-size: 13px; font-style: inherit;"&gt;SET vTest2= =Concat(location, ', ');&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The scope of the equals sign does not carry into variables. Qlik assumes anything within $() is just text.&lt;/LI&gt;&lt;LI&gt;To get Qlik to evaluate the expression, we need to add the equal sign within the variable.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=====================================&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FOLLOW-UP QUESTION&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;How can I make this work without any variable or dollar-sign expansion? I've tried defining my dimension as:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;='Concat(location, ', ')'&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;='=Concat(location, ', ')'&lt;/STRONG&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;But neither of those work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can do it without the variable by defining the dimension like this:&lt;STRONG&gt; ='$(=Concat(location, ', '))'&lt;/STRONG&gt;, but why do I need dollar-sign expansion if I have no variable?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Tanya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Nov 2016 14:01:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Variable-expansion-quotes-and-equal-sign/m-p/1231025#M24042</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-11-11T14:01:36Z</dc:date>
    </item>
    <item>
      <title>Re: Variable expansion, quotes and equal sign</title>
      <link>https://community.qlik.com/t5/App-Development/Variable-expansion-quotes-and-equal-sign/m-p/1231026#M24043</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe some Qlik expert can help you with "why" but as a first line developer, I will define a variable in the front (not script) like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/143779_pastedImage_0.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and then use it to the dimension:&lt;/P&gt;&lt;P&gt;&lt;IMG class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/143789_pastedImage_1.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fei&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 13 Nov 2016 20:07:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Variable-expansion-quotes-and-equal-sign/m-p/1231026#M24043</guid>
      <dc:creator>NZFei</dc:creator>
      <dc:date>2016-11-13T20:07:15Z</dc:date>
    </item>
    <item>
      <title>Re: Variable expansion, quotes and equal sign</title>
      <link>https://community.qlik.com/t5/App-Development/Variable-expansion-quotes-and-equal-sign/m-p/1231027#M24044</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oh - isn't that interesting! I thought I always needed dollar-sign expansion when using a variable. This syntax is so confusing!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Nov 2016 15:56:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Variable-expansion-quotes-and-equal-sign/m-p/1231027#M24044</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-11-14T15:56:41Z</dc:date>
    </item>
  </channel>
</rss>

