<?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: Variables in Bar Charts in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Variables-in-Bar-Charts/m-p/1776356#M455145</link>
    <description>&lt;P&gt;You could try to dollar-expand your variables like this $(vIncrease).&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;=sum(Distinct Value) + if(Year='2022',&lt;STRONG&gt;$&lt;/STRONG&gt;(vIncrease),&lt;BR /&gt;&amp;nbsp;if(Year='2023',&lt;STRONG&gt;$&lt;/STRONG&gt;(vIncrease123),&lt;BR /&gt;&amp;nbsp; &amp;nbsp;if(Year='2024',&lt;STRONG&gt;$&lt;/STRONG&gt;(vIncrease124),&amp;nbsp;&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;if(Year='2025',&lt;STRONG&gt;$&lt;/STRONG&gt;(vIncrease125),&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if(Year='2026',&lt;STRONG&gt;$&lt;/STRONG&gt;(vIncrease126),&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if(Year='2027', &lt;STRONG&gt;$&lt;/STRONG&gt;(vIncrease127),0))))))&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Does this help?&lt;/P&gt;</description>
    <pubDate>Thu, 21 Jan 2021 14:29:58 GMT</pubDate>
    <dc:creator>Vegar</dc:creator>
    <dc:date>2021-01-21T14:29:58Z</dc:date>
    <item>
      <title>Variables in Bar Charts</title>
      <link>https://community.qlik.com/t5/QlikView/Variables-in-Bar-Charts/m-p/1776334#M455144</link>
      <description>&lt;P&gt;I have a the chart below that shows Demand by year.&amp;nbsp; I would like to have the ability to add/remove demand by year to see what the chart looks like after changes.&amp;nbsp; I have created 6 input boxes that create 6 unique variables, one for each year, and I would like to add a different amount into each input box/variable and have the chart update accordingly.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="EGilbert_0-1611235014871.png" style="width: 696px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/47576iBBA08310FB493E1F/image-dimensions/696x178?v=v2" width="696" height="178" role="button" title="EGilbert_0-1611235014871.png" alt="EGilbert_0-1611235014871.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The base expression to get the demand is : (Value is the demand dimension)&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;=sum(Distinct Value)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;I can get it to add the same variable input in all years by updating to the following: (vIncrease is the variable created by the input box)&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;=sum(Distinct Value)+(vIncrease)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;I would like each variable to impact only a specific year in the chart so I tried the expression below:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;=sum(Distinct Value)+if(Year='2022',(vIncrease),if(Year='2023',(vIncrease123),if(Year='2024',(vIncrease124),if(Year='2025',(vIncrease125),if(Year='2026',(vIncrease126),if(Year='2027', (vIncrease127),0))))))&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;This does not work.&amp;nbsp; The results are the same as before I did any work with variables.&amp;nbsp; I have tried removing the single quotes from the year, I put the string inside the original sum equation, I have added each if statement as a separate added amount and not embedded.&amp;nbsp; Any thoughts on how to make this work, or if it is possible?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 17:35:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variables-in-Bar-Charts/m-p/1776334#M455144</guid>
      <dc:creator>EGilbert</dc:creator>
      <dc:date>2024-11-16T17:35:38Z</dc:date>
    </item>
    <item>
      <title>Re: Variables in Bar Charts</title>
      <link>https://community.qlik.com/t5/QlikView/Variables-in-Bar-Charts/m-p/1776356#M455145</link>
      <description>&lt;P&gt;You could try to dollar-expand your variables like this $(vIncrease).&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;=sum(Distinct Value) + if(Year='2022',&lt;STRONG&gt;$&lt;/STRONG&gt;(vIncrease),&lt;BR /&gt;&amp;nbsp;if(Year='2023',&lt;STRONG&gt;$&lt;/STRONG&gt;(vIncrease123),&lt;BR /&gt;&amp;nbsp; &amp;nbsp;if(Year='2024',&lt;STRONG&gt;$&lt;/STRONG&gt;(vIncrease124),&amp;nbsp;&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;if(Year='2025',&lt;STRONG&gt;$&lt;/STRONG&gt;(vIncrease125),&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if(Year='2026',&lt;STRONG&gt;$&lt;/STRONG&gt;(vIncrease126),&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if(Year='2027', &lt;STRONG&gt;$&lt;/STRONG&gt;(vIncrease127),0))))))&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Does this help?&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jan 2021 14:29:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variables-in-Bar-Charts/m-p/1776356#M455145</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2021-01-21T14:29:58Z</dc:date>
    </item>
    <item>
      <title>Re: Variables in Bar Charts</title>
      <link>https://community.qlik.com/t5/QlikView/Variables-in-Bar-Charts/m-p/1776362#M455146</link>
      <description>&lt;P&gt;Thanks for the suggestion.&amp;nbsp; that did not work for me, still just like the original chart with no variable add&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jan 2021 14:38:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variables-in-Bar-Charts/m-p/1776362#M455146</guid>
      <dc:creator>EGilbert</dc:creator>
      <dc:date>2021-01-21T14:38:05Z</dc:date>
    </item>
  </channel>
</rss>

