<?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 Bar chart with sum values in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Bar-chart-with-sum-values/m-p/1731514#M455478</link>
    <description>&lt;P&gt;Hi, I have a dataset of all contracts of a company over time. Some contracts are already expired, some will expire in the coming years. What I want is to show a monthly chart with current active contracts and the monthly reduction.&lt;/P&gt;&lt;P&gt;Below are some fake examples of the dataset. I can't attach it here because it's confidential.&lt;/P&gt;&lt;TABLE border="1" width="99.87546699875467%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="25.77833125778331%" height="25px"&gt;&lt;FONT size="4"&gt;Customer ID&lt;/FONT&gt;&lt;/TD&gt;&lt;TD width="21.170610211706105%" height="25px"&gt;Contract Number&lt;/TD&gt;&lt;TD width="26.40099626400996%" height="25px"&gt;Contract start&lt;/TD&gt;&lt;TD width="13.262764632627647%" height="25px"&gt;Contract end&lt;/TD&gt;&lt;TD width="13.262764632627647%"&gt;Status&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25.77833125778331%" height="25px"&gt;1&lt;/TD&gt;&lt;TD width="21.170610211706105%" height="25px"&gt;100000&lt;/TD&gt;&lt;TD width="26.40099626400996%" height="25px"&gt;01/01/2019&lt;/TD&gt;&lt;TD width="13.262764632627647%" height="25px"&gt;01/01/2021&lt;/TD&gt;&lt;TD width="13.262764632627647%"&gt;&lt;P&gt;Activated&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25.77833125778331%"&gt;1&lt;/TD&gt;&lt;TD width="21.170610211706105%"&gt;100005&lt;/TD&gt;&lt;TD width="26.40099626400996%"&gt;01/01/2015&lt;/TD&gt;&lt;TD width="13.262764632627647%"&gt;31/12/2018&lt;/TD&gt;&lt;TD width="13.262764632627647%"&gt;Terminated&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25.77833125778331%" height="25px"&gt;2&lt;/TD&gt;&lt;TD width="21.170610211706105%" height="25px"&gt;100020&lt;/TD&gt;&lt;TD width="26.40099626400996%" height="25px"&gt;15/06/2020&lt;/TD&gt;&lt;TD width="13.262764632627647%" height="25px"&gt;31/12/2025&lt;/TD&gt;&lt;TD width="13.262764632627647%"&gt;Activated&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25.77833125778331%" height="25px"&gt;3&lt;/TD&gt;&lt;TD width="21.170610211706105%" height="25px"&gt;100150&lt;/TD&gt;&lt;TD width="26.40099626400996%" height="25px"&gt;25/04/2018&lt;/TD&gt;&lt;TD width="13.262764632627647%" height="25px"&gt;24/04/2023&lt;/TD&gt;&lt;TD width="13.262764632627647%"&gt;Activated&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25.77833125778331%"&gt;3&lt;/TD&gt;&lt;TD width="21.170610211706105%"&gt;100033&lt;/TD&gt;&lt;TD width="26.40099626400996%"&gt;25/01/2016&lt;/TD&gt;&lt;TD width="13.262764632627647%"&gt;24/04/2018&lt;/TD&gt;&lt;TD width="13.262764632627647%"&gt;Terminated&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25.77833125778331%" height="25px"&gt;4&lt;/TD&gt;&lt;TD width="21.170610211706105%" height="25px"&gt;100200&lt;/TD&gt;&lt;TD width="26.40099626400996%" height="25px"&gt;19/01/2017&lt;/TD&gt;&lt;TD width="13.262764632627647%" height="25px"&gt;18/01/2027&lt;/TD&gt;&lt;TD width="13.262764632627647%"&gt;Activated&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25.77833125778331%" height="25px"&gt;5&lt;/TD&gt;&lt;TD width="21.170610211706105%" height="25px"&gt;100500&lt;/TD&gt;&lt;TD width="26.40099626400996%" height="25px"&gt;01/01/2020&lt;/TD&gt;&lt;TD width="13.262764632627647%" height="25px"&gt;31/12/2022&lt;/TD&gt;&lt;TD width="13.262764632627647%"&gt;Activated&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;So this month the chart would show all active contracts, next month it would show all active contracts minus the contracts expiring that month and so on.&lt;/P&gt;&lt;P&gt;I made a chart with the [Contract end] as dimension and I&amp;nbsp;was able to get the contracts expiring each month with:&lt;/P&gt;&lt;P&gt;COUNT({$&amp;lt;[Contract end]={'&amp;gt;=$(=today())'}, Status = {"Activated"}&amp;gt;} DISTINCT[Contract Number])&lt;/P&gt;&lt;P&gt;Also, in a textbox I can get the total active contracts right now:&lt;/P&gt;&lt;P&gt;SUM(COUNT({$&amp;lt;[Contract end]={'&amp;gt;=$(=today())'}, Status={"Activated"}&amp;gt;} TOTAL DISTINCT [Contract Number]))&lt;/P&gt;&lt;P&gt;However, I don't know how to combine these two. I can't use back accumulation because contracts have different durations, so having a fixed backstep wouldn't do the trick.&lt;/P&gt;&lt;P&gt;Note: the filter where Contract end &amp;gt;= today is important because sometimes the database is not properly updated and the contract is shown as activated even if the date is already in the past.&lt;/P&gt;</description>
    <pubDate>Tue, 28 Jul 2020 20:10:46 GMT</pubDate>
    <dc:creator>gcorazza</dc:creator>
    <dc:date>2020-07-28T20:10:46Z</dc:date>
    <item>
      <title>Bar chart with sum values</title>
      <link>https://community.qlik.com/t5/QlikView/Bar-chart-with-sum-values/m-p/1731514#M455478</link>
      <description>&lt;P&gt;Hi, I have a dataset of all contracts of a company over time. Some contracts are already expired, some will expire in the coming years. What I want is to show a monthly chart with current active contracts and the monthly reduction.&lt;/P&gt;&lt;P&gt;Below are some fake examples of the dataset. I can't attach it here because it's confidential.&lt;/P&gt;&lt;TABLE border="1" width="99.87546699875467%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="25.77833125778331%" height="25px"&gt;&lt;FONT size="4"&gt;Customer ID&lt;/FONT&gt;&lt;/TD&gt;&lt;TD width="21.170610211706105%" height="25px"&gt;Contract Number&lt;/TD&gt;&lt;TD width="26.40099626400996%" height="25px"&gt;Contract start&lt;/TD&gt;&lt;TD width="13.262764632627647%" height="25px"&gt;Contract end&lt;/TD&gt;&lt;TD width="13.262764632627647%"&gt;Status&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25.77833125778331%" height="25px"&gt;1&lt;/TD&gt;&lt;TD width="21.170610211706105%" height="25px"&gt;100000&lt;/TD&gt;&lt;TD width="26.40099626400996%" height="25px"&gt;01/01/2019&lt;/TD&gt;&lt;TD width="13.262764632627647%" height="25px"&gt;01/01/2021&lt;/TD&gt;&lt;TD width="13.262764632627647%"&gt;&lt;P&gt;Activated&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25.77833125778331%"&gt;1&lt;/TD&gt;&lt;TD width="21.170610211706105%"&gt;100005&lt;/TD&gt;&lt;TD width="26.40099626400996%"&gt;01/01/2015&lt;/TD&gt;&lt;TD width="13.262764632627647%"&gt;31/12/2018&lt;/TD&gt;&lt;TD width="13.262764632627647%"&gt;Terminated&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25.77833125778331%" height="25px"&gt;2&lt;/TD&gt;&lt;TD width="21.170610211706105%" height="25px"&gt;100020&lt;/TD&gt;&lt;TD width="26.40099626400996%" height="25px"&gt;15/06/2020&lt;/TD&gt;&lt;TD width="13.262764632627647%" height="25px"&gt;31/12/2025&lt;/TD&gt;&lt;TD width="13.262764632627647%"&gt;Activated&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25.77833125778331%" height="25px"&gt;3&lt;/TD&gt;&lt;TD width="21.170610211706105%" height="25px"&gt;100150&lt;/TD&gt;&lt;TD width="26.40099626400996%" height="25px"&gt;25/04/2018&lt;/TD&gt;&lt;TD width="13.262764632627647%" height="25px"&gt;24/04/2023&lt;/TD&gt;&lt;TD width="13.262764632627647%"&gt;Activated&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25.77833125778331%"&gt;3&lt;/TD&gt;&lt;TD width="21.170610211706105%"&gt;100033&lt;/TD&gt;&lt;TD width="26.40099626400996%"&gt;25/01/2016&lt;/TD&gt;&lt;TD width="13.262764632627647%"&gt;24/04/2018&lt;/TD&gt;&lt;TD width="13.262764632627647%"&gt;Terminated&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25.77833125778331%" height="25px"&gt;4&lt;/TD&gt;&lt;TD width="21.170610211706105%" height="25px"&gt;100200&lt;/TD&gt;&lt;TD width="26.40099626400996%" height="25px"&gt;19/01/2017&lt;/TD&gt;&lt;TD width="13.262764632627647%" height="25px"&gt;18/01/2027&lt;/TD&gt;&lt;TD width="13.262764632627647%"&gt;Activated&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25.77833125778331%" height="25px"&gt;5&lt;/TD&gt;&lt;TD width="21.170610211706105%" height="25px"&gt;100500&lt;/TD&gt;&lt;TD width="26.40099626400996%" height="25px"&gt;01/01/2020&lt;/TD&gt;&lt;TD width="13.262764632627647%" height="25px"&gt;31/12/2022&lt;/TD&gt;&lt;TD width="13.262764632627647%"&gt;Activated&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;So this month the chart would show all active contracts, next month it would show all active contracts minus the contracts expiring that month and so on.&lt;/P&gt;&lt;P&gt;I made a chart with the [Contract end] as dimension and I&amp;nbsp;was able to get the contracts expiring each month with:&lt;/P&gt;&lt;P&gt;COUNT({$&amp;lt;[Contract end]={'&amp;gt;=$(=today())'}, Status = {"Activated"}&amp;gt;} DISTINCT[Contract Number])&lt;/P&gt;&lt;P&gt;Also, in a textbox I can get the total active contracts right now:&lt;/P&gt;&lt;P&gt;SUM(COUNT({$&amp;lt;[Contract end]={'&amp;gt;=$(=today())'}, Status={"Activated"}&amp;gt;} TOTAL DISTINCT [Contract Number]))&lt;/P&gt;&lt;P&gt;However, I don't know how to combine these two. I can't use back accumulation because contracts have different durations, so having a fixed backstep wouldn't do the trick.&lt;/P&gt;&lt;P&gt;Note: the filter where Contract end &amp;gt;= today is important because sometimes the database is not properly updated and the contract is shown as activated even if the date is already in the past.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jul 2020 20:10:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Bar-chart-with-sum-values/m-p/1731514#M455478</guid>
      <dc:creator>gcorazza</dc:creator>
      <dc:date>2020-07-28T20:10:46Z</dc:date>
    </item>
    <item>
      <title>Re: Bar chart with sum values</title>
      <link>https://community.qlik.com/t5/QlikView/Bar-chart-with-sum-values/m-p/1731560#M455479</link>
      <description>&lt;P&gt;I would recommend you to look into &lt;A title="IntervalMatch() " href="https://help.qlik.com/en-US/qlikview/April2020/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptPrefixes/IntervalMatch.htm" target="_self"&gt;IntervalMatch()&lt;/A&gt;&amp;nbsp;. IntervalMatch could help you solve your issue by linking your dataset to a master calendar.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jul 2020 04:00:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Bar-chart-with-sum-values/m-p/1731560#M455479</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2020-07-29T04:00:07Z</dc:date>
    </item>
  </channel>
</rss>

