<?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 Conditional data display on bar chart - how to make it work? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Conditional-data-display-on-bar-chart-how-to-make-it-work/m-p/446277#M485548</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm building a bar chart to show cash balance for each month in a given year - currently I have 2012 and 2013 balances showing.&amp;nbsp; However the chart is showing balances for future months, when these should be null.&amp;nbsp; I'm using set analysis formulas to sum the cash accounts over periods in a given year and 'Full Accumulation' is set so that the amount calculated in each display period is based on prior period balances - i.e. the accounting system that is the source of the data captures the change in balance in each period, so to get a total balance at any point in time I need to add the value (change) in that period to the sum of all prior periods.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Because of this logic, the chart shows ever-growing balances in future months.&amp;nbsp; I want to create a condition that will return a null amount, or zero, in any month beyond the current one - e.g. if my data is populated through April 2013, I don't want to see bars in May - Dec 2013.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've had a lot of frustration trying to figure out a way to do this with conditional expressions in the "Expressions" tab on Chart Properties.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's the chart:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="38030" class="jive-image-thumbnail jive-image" height="210" onclick="" alt="CashBalanceChart.png" src="https://community.qlik.com/legacyfs/online/38030_CashBalanceChart.png" style="width: 356px; height: 210.43555555555554px;" width="356" /&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2012 calculations are correct - and the 2013 calculations are correct through April.&amp;nbsp; After that they get out of control and are invalid.&amp;nbsp; I just want the red bars to automatically disappear from the chart from period 5 onward (and when it's May, from period 6 onward, etc).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The formula used to calculate the balance is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13656983753642306" jivemacro_uid="_13656983753642306"&gt;&lt;P&gt;(Sum( { $&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt; $(eCashAccounts)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;, Year = {2013}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;, Quarter=&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;, Period=&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;, Month=&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[# Summary Amount]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;)&lt;/P&gt;&lt;P&gt;+ $(=$(vCashBal_PeriodZeroYearParam(2013)))&lt;/P&gt;&lt;P&gt;) &lt;SPAN style="font-size: 10pt;"&gt;/ Divisor&lt;/SPAN&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;("Divisor" is a field used by the user to select 1000s, millions, etc).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The "eCashAccounts" variable is just a set that filters all of the general ledger accounts down to just the bank accounts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the other variable, "vCashBal_PeriodZeroYearParam(2013)" is a parameterized variable that extracts the period zero cash balance - i.e. in each accounting year, there's an initial balance (period 0) that has to be added to the monthly amounts in order to get the final, ending balance.&amp;nbsp; The formula is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13656988800404801" jivemacro_uid="_13656988800404801"&gt;&lt;P&gt;=Sum( { $&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt; $(eCashAccounts)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;, Year = {$1}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;, [Period (#)] = {0}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[# Summary Amount]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't think either of these formulae are the issue - they work perfectly for 2012 and for months in 2013 up to the point where we have data.&amp;nbsp; I just need help figuring out how to make the chart show nothing when the month on the chart exceeds the maximum month from the dataset (I have a variable, vMonthMax_Selected, for this).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For reference, here's the data model:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="38051" class="jive-image-thumbnail jive-image" onclick="" alt="FinStatementsDataTable.png" src="https://community.qlik.com/legacyfs/online/38051_FinStatementsDataTable.png" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I appreciate any help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 11 Apr 2013 16:58:03 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-04-11T16:58:03Z</dc:date>
    <item>
      <title>Conditional data display on bar chart - how to make it work?</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-data-display-on-bar-chart-how-to-make-it-work/m-p/446277#M485548</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm building a bar chart to show cash balance for each month in a given year - currently I have 2012 and 2013 balances showing.&amp;nbsp; However the chart is showing balances for future months, when these should be null.&amp;nbsp; I'm using set analysis formulas to sum the cash accounts over periods in a given year and 'Full Accumulation' is set so that the amount calculated in each display period is based on prior period balances - i.e. the accounting system that is the source of the data captures the change in balance in each period, so to get a total balance at any point in time I need to add the value (change) in that period to the sum of all prior periods.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Because of this logic, the chart shows ever-growing balances in future months.&amp;nbsp; I want to create a condition that will return a null amount, or zero, in any month beyond the current one - e.g. if my data is populated through April 2013, I don't want to see bars in May - Dec 2013.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've had a lot of frustration trying to figure out a way to do this with conditional expressions in the "Expressions" tab on Chart Properties.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's the chart:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="38030" class="jive-image-thumbnail jive-image" height="210" onclick="" alt="CashBalanceChart.png" src="https://community.qlik.com/legacyfs/online/38030_CashBalanceChart.png" style="width: 356px; height: 210.43555555555554px;" width="356" /&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2012 calculations are correct - and the 2013 calculations are correct through April.&amp;nbsp; After that they get out of control and are invalid.&amp;nbsp; I just want the red bars to automatically disappear from the chart from period 5 onward (and when it's May, from period 6 onward, etc).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The formula used to calculate the balance is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13656983753642306" jivemacro_uid="_13656983753642306"&gt;&lt;P&gt;(Sum( { $&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt; $(eCashAccounts)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;, Year = {2013}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;, Quarter=&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;, Period=&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;, Month=&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[# Summary Amount]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;)&lt;/P&gt;&lt;P&gt;+ $(=$(vCashBal_PeriodZeroYearParam(2013)))&lt;/P&gt;&lt;P&gt;) &lt;SPAN style="font-size: 10pt;"&gt;/ Divisor&lt;/SPAN&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;("Divisor" is a field used by the user to select 1000s, millions, etc).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The "eCashAccounts" variable is just a set that filters all of the general ledger accounts down to just the bank accounts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the other variable, "vCashBal_PeriodZeroYearParam(2013)" is a parameterized variable that extracts the period zero cash balance - i.e. in each accounting year, there's an initial balance (period 0) that has to be added to the monthly amounts in order to get the final, ending balance.&amp;nbsp; The formula is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13656988800404801" jivemacro_uid="_13656988800404801"&gt;&lt;P&gt;=Sum( { $&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt; $(eCashAccounts)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;, Year = {$1}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;, [Period (#)] = {0}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[# Summary Amount]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't think either of these formulae are the issue - they work perfectly for 2012 and for months in 2013 up to the point where we have data.&amp;nbsp; I just need help figuring out how to make the chart show nothing when the month on the chart exceeds the maximum month from the dataset (I have a variable, vMonthMax_Selected, for this).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For reference, here's the data model:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="38051" class="jive-image-thumbnail jive-image" onclick="" alt="FinStatementsDataTable.png" src="https://community.qlik.com/legacyfs/online/38051_FinStatementsDataTable.png" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I appreciate any help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Apr 2013 16:58:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-data-display-on-bar-chart-how-to-make-it-work/m-p/446277#M485548</guid>
      <dc:creator />
      <dc:date>2013-04-11T16:58:03Z</dc:date>
    </item>
  </channel>
</rss>

