<?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: set a variable depending on a diffrent variables content in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/set-a-variable-depending-on-a-diffrent-variables-content/m-p/22908#M3848</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You mean on the buttons when I assigning the variable?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 14 Feb 2018 13:16:45 GMT</pubDate>
    <dc:creator>t_hylander</dc:creator>
    <dc:date>2018-02-14T13:16:45Z</dc:date>
    <item>
      <title>set a variable depending on a diffrent variables content</title>
      <link>https://community.qlik.com/t5/QlikView/set-a-variable-depending-on-a-diffrent-variables-content/m-p/22906#M3846</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Not sure how to solve this, so not sure how to search for an answer.&lt;/P&gt;&lt;P&gt;Ive got several buttons, that sets a variable as a action. Button1 sets vProduct='Cars', Button2 sets vProduct='Boats' asf.&lt;/P&gt;&lt;P&gt;Now I want a bar chart to dynamic show the number of Products with a reclamation (I set a flag when loading the data).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" jive-data-cell="{&amp;quot;color&amp;quot;:&amp;quot;#000000&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;left&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;2&amp;quot;}" jive-data-header="{&amp;quot;color&amp;quot;:&amp;quot;#FFFFFF&amp;quot;,&amp;quot;backgroundColor&amp;quot;:&amp;quot;#6690BC&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;center&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;2&amp;quot;,&amp;quot;fontFamily&amp;quot;:&amp;quot;arial,helvetica,sans-serif&amp;quot;,&amp;quot;verticalAlign&amp;quot;:&amp;quot;baseline&amp;quot;}" style="border: 1px solid #000000; border-image: none; width: 50%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="padding: 2px; width: 109px; text-align: center; color: #ffffff; background-color: #6690bc;" valign="middle"&gt;&lt;STRONG&gt;date&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="padding: 2px; width: 26px; text-align: center; color: #ffffff; background-color: #6690bc;" valign="middle"&gt;&lt;STRONG&gt;_RecFlagCars&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="padding: 2px; width: 26px; text-align: center; color: #ffffff; background-color: #6690bc;" valign="middle"&gt;&lt;STRONG&gt;_RecFlagBoats&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2017-06-01&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2017-06-02&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2017-06-04&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2017-06-04&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2017-06-06&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When Button1 is pressed the barchart should only show 'sum(_RecFlagCars)' (with date as dimension).&lt;/P&gt;&lt;P&gt;Id like to use the variable that I use on the Button1 to change the ending om '_RecFlag', something like this;&lt;/P&gt;&lt;P&gt;"Sum({&amp;lt;Week={=$(vCurrWeek)}&amp;gt;} _RecFlag" &amp;amp; vProduct &amp;amp; "')"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tried using a inline-table like this;&lt;/P&gt;&lt;P&gt;Value, expression&lt;/P&gt;&lt;P&gt;Cars, Sum({&amp;lt;Week={=$(vCurrWeek)}&amp;gt;} _RecFlagCars)&lt;/P&gt;&lt;P&gt;Boats, Sum({&amp;lt;Week={=$(vCurrWeek)}&amp;gt;} _RecFlagBoats)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when I look at expression it shows "Sum({&amp;lt;Week={}&amp;gt;} _RecFlagCars", of some reason it dont like the variable in there &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone have any idea how to solve this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Feb 2018 13:06:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-a-variable-depending-on-a-diffrent-variables-content/m-p/22906#M3846</guid>
      <dc:creator>t_hylander</dc:creator>
      <dc:date>2018-02-14T13:06:30Z</dc:date>
    </item>
    <item>
      <title>Re: set a variable depending on a diffrent variables content</title>
      <link>https://community.qlik.com/t5/QlikView/set-a-variable-depending-on-a-diffrent-variables-content/m-p/22907#M3847</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;why don't you simply use an If to solve this ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Feb 2018 13:14:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-a-variable-depending-on-a-diffrent-variables-content/m-p/22907#M3847</guid>
      <dc:creator>YoussefBelloum</dc:creator>
      <dc:date>2018-02-14T13:14:06Z</dc:date>
    </item>
    <item>
      <title>Re: set a variable depending on a diffrent variables content</title>
      <link>https://community.qlik.com/t5/QlikView/set-a-variable-depending-on-a-diffrent-variables-content/m-p/22908#M3848</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You mean on the buttons when I assigning the variable?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Feb 2018 13:16:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-a-variable-depending-on-a-diffrent-variables-content/m-p/22908#M3848</guid>
      <dc:creator>t_hylander</dc:creator>
      <dc:date>2018-02-14T13:16:45Z</dc:date>
    </item>
    <item>
      <title>Re: set a variable depending on a diffrent variables content</title>
      <link>https://community.qlik.com/t5/QlikView/set-a-variable-depending-on-a-diffrent-variables-content/m-p/22909#M3849</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No, I mean on the barcharts when trying to change the expression between &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px;"&gt;_RecFlagCars and &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px;"&gt;_RecFlagBoats.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 12px; 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-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;STRONG&gt;If($(&lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px;"&gt;&lt;STRONG&gt;vProduct)='Cars', &lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px;"&gt;&lt;STRONG&gt;Sum({&amp;lt;Week={=$(vCurrWeek)}&amp;gt;} &lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px;"&gt;&lt;STRONG&gt;_RecFlagCars ), &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px;"&gt;Sum({&amp;lt;Week={=$(vCurrWeek)}&amp;gt;} &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px;"&gt;_RecFlagBoats&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px;"&gt;&lt;STRONG&gt;) )&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Feb 2018 13:26:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-a-variable-depending-on-a-diffrent-variables-content/m-p/22909#M3849</guid>
      <dc:creator>YoussefBelloum</dc:creator>
      <dc:date>2018-02-14T13:26:11Z</dc:date>
    </item>
    <item>
      <title>Re: set a variable depending on a diffrent variables content</title>
      <link>https://community.qlik.com/t5/QlikView/set-a-variable-depending-on-a-diffrent-variables-content/m-p/22910#M3850</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The problem is that the $ expansion is happening inside the inline load, so it is attempting to substitute &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;$(vCurrWeek)&lt;/SPAN&gt; with the value of &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;vCurrWeek - which is probably undefined at that point. If you load from a text file or spreadsheet, the $ expansion will not take place. In an inline, you will need to delay the expansion. This is one way&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; Value,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; Replace(expression, '#', '$') as expression&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Inline&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;[&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Value, expression&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Cars, Sum({&amp;lt;Week={=&lt;STRONG&gt;#&lt;/STRONG&gt;vCurrWeek)}&amp;gt;} _RecFlagCars)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Boats, Sum({&amp;lt;Week={=&lt;STRONG&gt;#&lt;/STRONG&gt;(vCurrWeek)}&amp;gt;} _RecFlagBoats)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;];&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Feb 2018 13:29:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-a-variable-depending-on-a-diffrent-variables-content/m-p/22910#M3850</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2018-02-14T13:29:19Z</dc:date>
    </item>
    <item>
      <title>Re: set a variable depending on a diffrent variables content</title>
      <link>https://community.qlik.com/t5/QlikView/set-a-variable-depending-on-a-diffrent-variables-content/m-p/22911#M3851</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ofcourse, stupid me. Works like a charm!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Feb 2018 14:39:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-a-variable-depending-on-a-diffrent-variables-content/m-p/22911#M3851</guid>
      <dc:creator>t_hylander</dc:creator>
      <dc:date>2018-02-14T14:39:35Z</dc:date>
    </item>
    <item>
      <title>Re: set a variable depending on a diffrent variables content</title>
      <link>https://community.qlik.com/t5/QlikView/set-a-variable-depending-on-a-diffrent-variables-content/m-p/22912#M3852</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This work to, but with the IF-statement theres no need for a inline-load.&lt;/P&gt;&lt;P&gt;Could be useful in other scenarios aswell so Ill keep it in mind.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Feb 2018 14:41:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-a-variable-depending-on-a-diffrent-variables-content/m-p/22912#M3852</guid>
      <dc:creator>t_hylander</dc:creator>
      <dc:date>2018-02-14T14:41:17Z</dc:date>
    </item>
  </channel>
</rss>

