<?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 Diagonal reference line in histogram as a bar chart ? in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Diagonal-reference-line-in-histogram-as-a-bar-chart/m-p/1158748#M20994</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to add a diagonal line (for reference) to a histogram (based on a bar chart).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I managed so far is to create a line with the following formula (with date on the x-axis and sales on the y axis)&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #2c2d30; font-family: Slack-Lato, appleLogo, sans-serif; font-size: 15px; background-color: #f9f9f9;"&gt;LINEST_M(total aggr(if(sum(SALES),sum(SALES)),date),date)*date+linest_b(total aggr(if(sum(SALES),sum(SALES)),date),date)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;however, what I'd like to do is to compare predictions (simple movig average in this case: ewma) vs the average per prediction sales, and the following seems to work as well:&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #2c2d30; font-family: Slack-Lato, appleLogo, sans-serif; font-size: 15px; background-color: #f9f9f9;"&gt;LINEST_M(total aggr(if(avg(SALES),avg(SALES)),ewma),ewma)*ewma+linest_b(total aggr(if(avg(SALES),avg(SALES)),ewma),ewma)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;(ie replace date with ewma and sum with avg)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, this produces a long big graph.. What I'd now like to do is to have a histogram, i.e. a binned x - axis like =Round(ewma,1).&lt;/P&gt;&lt;P&gt;I can do the histogram of the quantities alright but not the diagonal line....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be very welcome,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;many thanks&lt;/P&gt;&lt;P&gt;Ulrich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 27 May 2016 09:25:20 GMT</pubDate>
    <dc:creator />
    <dc:date>2016-05-27T09:25:20Z</dc:date>
    <item>
      <title>Diagonal reference line in histogram as a bar chart ?</title>
      <link>https://community.qlik.com/t5/App-Development/Diagonal-reference-line-in-histogram-as-a-bar-chart/m-p/1158748#M20994</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to add a diagonal line (for reference) to a histogram (based on a bar chart).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I managed so far is to create a line with the following formula (with date on the x-axis and sales on the y axis)&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #2c2d30; font-family: Slack-Lato, appleLogo, sans-serif; font-size: 15px; background-color: #f9f9f9;"&gt;LINEST_M(total aggr(if(sum(SALES),sum(SALES)),date),date)*date+linest_b(total aggr(if(sum(SALES),sum(SALES)),date),date)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;however, what I'd like to do is to compare predictions (simple movig average in this case: ewma) vs the average per prediction sales, and the following seems to work as well:&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #2c2d30; font-family: Slack-Lato, appleLogo, sans-serif; font-size: 15px; background-color: #f9f9f9;"&gt;LINEST_M(total aggr(if(avg(SALES),avg(SALES)),ewma),ewma)*ewma+linest_b(total aggr(if(avg(SALES),avg(SALES)),ewma),ewma)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;(ie replace date with ewma and sum with avg)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, this produces a long big graph.. What I'd now like to do is to have a histogram, i.e. a binned x - axis like =Round(ewma,1).&lt;/P&gt;&lt;P&gt;I can do the histogram of the quantities alright but not the diagonal line....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be very welcome,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;many thanks&lt;/P&gt;&lt;P&gt;Ulrich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 May 2016 09:25:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Diagonal-reference-line-in-histogram-as-a-bar-chart/m-p/1158748#M20994</guid>
      <dc:creator />
      <dc:date>2016-05-27T09:25:20Z</dc:date>
    </item>
  </channel>
</rss>

