<?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: Referencing multiple variables in a single expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Referencing-multiple-variables-in-a-single-expression/m-p/1061002#M355216</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tate,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I believe you are right, the visual cues expressions are only evaluated in total context, not per dimension line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But you can use background / text color attribute expressions, go to expression tab and open the attribute expressions by clicking on the small plus sign next to the expression label on the upper left.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select background color and enter a color expression, like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=If( &lt;EM&gt;Sum(FIELD)&lt;/EM&gt; &amp;gt; Pick(Match(product_data.segment,'Athletic','Boot'),vAthleticRev, vBootRev), LightRed() )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead of &lt;EM&gt;Sum(FIELD),&lt;/EM&gt; use the measure you want to compare, i.e. the measure expression itself.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See also attached.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 24 Jan 2016 12:22:40 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2016-01-24T12:22:40Z</dc:date>
    <item>
      <title>Referencing multiple variables in a single expression</title>
      <link>https://community.qlik.com/t5/QlikView/Referencing-multiple-variables-in-a-single-expression/m-p/1060998#M355212</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have multiple variables that store user input for the desired revenue for a product segment.&amp;nbsp; I am trying to display this information in a chart next to the relevant segment and the actual revenue.&amp;nbsp; I have named the variables using the pattern 'v' &amp;amp; product_data.segment &amp;amp; 'Rev'.&amp;nbsp; For example, I have vAthleticRev, vBootRev, etc.&amp;nbsp; I am trying to create an expression in a table that displays the values in these variables using dollar sign expansion.&amp;nbsp; The closest I get is creating a table with segment as the dimension and the following as the expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=$(=$(vDynSegment))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vDynSegment contains 'v' &amp;amp; product_data.segment &amp;amp; 'Rev'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This solution only works when I select the row, otherwise it comes out as -.&amp;nbsp; This tells me that it is calculating the segment before the table dimension is applied.&amp;nbsp; I have tried many combinations of = and $, and just pasting the concatenation string into the expression. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In short, I need to build the variable from a concatenated string using the dimension, and then get the value of the variable and display it in the expression column.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the user put 60000 into the vBootRev variable, and the actual revenue was 58000, I would like the row in the table to look like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Segment&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Planned Revenue&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Actual Revenue&lt;/P&gt;&lt;P&gt;Boot&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $60,000&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; $58,000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the help.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 23 Jan 2016 21:20:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Referencing-multiple-variables-in-a-single-expression/m-p/1060998#M355212</guid>
      <dc:creator />
      <dc:date>2016-01-23T21:20:26Z</dc:date>
    </item>
    <item>
      <title>Re: Referencing multiple variables in a single expression</title>
      <link>https://community.qlik.com/t5/QlikView/Referencing-multiple-variables-in-a-single-expression/m-p/1060999#M355213</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are right that the dollar sign expansions are evaluated in TOTAL context, not in the context of your dimensions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try a pick/match combination&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Pick(Match(product_data.segment,'Athletic','Boot'),vAthleticRev, vBootRev)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 23 Jan 2016 22:39:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Referencing-multiple-variables-in-a-single-expression/m-p/1060999#M355213</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-01-23T22:39:49Z</dc:date>
    </item>
    <item>
      <title>Re: Referencing multiple variables in a single expression</title>
      <link>https://community.qlik.com/t5/QlikView/Referencing-multiple-variables-in-a-single-expression/m-p/1061000#M355214</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the help.&amp;nbsp; That worked like a charm.&amp;nbsp; Any idea why the same formula is not working in the visual cues tab for another row in the table?&amp;nbsp; I want the actual revenue to turn green if it is above this planned number, but the &amp;gt;= formula box does not seem to take advantage of the pick/match formula the same way the expression formula did.&amp;nbsp; Does this mean the visual cues formulas do not reference the dimension?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 24 Jan 2016 01:04:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Referencing-multiple-variables-in-a-single-expression/m-p/1061000#M355214</guid>
      <dc:creator />
      <dc:date>2016-01-24T01:04:19Z</dc:date>
    </item>
    <item>
      <title>Re: Referencing multiple variables in a single expression</title>
      <link>https://community.qlik.com/t5/QlikView/Referencing-multiple-variables-in-a-single-expression/m-p/1061001#M355215</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you have only one dimension in your table, then add another calculated dimension which will show the value that user entered in the corresponding variable using similar syntax.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Pick(Match(Product,'Casuality','Financial Lines','Speciality'),$(vCasuality),$(vFinancialLines),$(vSpecialty))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then conditionally hide or show that calculated dimension using below expression to avoid showing '-' if user don't enter any value to the variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=If((Len(vCasuality)= 0&amp;nbsp; or Len(vFinancialLines) =0 or Len(vSpecialty)=0),0,1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope I answered your question correctly. In case I understood your question wrongly , then please let me know.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 24 Jan 2016 03:47:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Referencing-multiple-variables-in-a-single-expression/m-p/1061001#M355215</guid>
      <dc:creator />
      <dc:date>2016-01-24T03:47:28Z</dc:date>
    </item>
    <item>
      <title>Re: Referencing multiple variables in a single expression</title>
      <link>https://community.qlik.com/t5/QlikView/Referencing-multiple-variables-in-a-single-expression/m-p/1061002#M355216</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tate,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I believe you are right, the visual cues expressions are only evaluated in total context, not per dimension line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But you can use background / text color attribute expressions, go to expression tab and open the attribute expressions by clicking on the small plus sign next to the expression label on the upper left.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select background color and enter a color expression, like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=If( &lt;EM&gt;Sum(FIELD)&lt;/EM&gt; &amp;gt; Pick(Match(product_data.segment,'Athletic','Boot'),vAthleticRev, vBootRev), LightRed() )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead of &lt;EM&gt;Sum(FIELD),&lt;/EM&gt; use the measure you want to compare, i.e. the measure expression itself.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See also attached.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 24 Jan 2016 12:22:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Referencing-multiple-variables-in-a-single-expression/m-p/1061002#M355216</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-01-24T12:22:40Z</dc:date>
    </item>
  </channel>
</rss>

