<?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: Reference line in bar chart in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Reference-line-in-bar-chart/m-p/1639137#M447054</link>
    <description>&lt;P&gt;Sandeep, did&amp;nbsp;&lt;SPAN&gt;Stoyan's post help you get what you needed?&amp;nbsp; If so, do not forget to come back and use the Accept as Solution button on his post to give him credit and let others know it worked.&amp;nbsp; If you are still working upon things, leave an update for us.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Regards,&lt;BR /&gt;Brett&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 23 Oct 2019 17:24:41 GMT</pubDate>
    <dc:creator>Brett_Bleess</dc:creator>
    <dc:date>2019-10-23T17:24:41Z</dc:date>
    <item>
      <title>Reference line in bar chart</title>
      <link>https://community.qlik.com/t5/QlikView/Reference-line-in-bar-chart/m-p/1636071#M446797</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Below is the bar chart where I showing wind distribution.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to show reference line, first reference line is always at wind speed 3. Other reference line has to be dynamic which&lt;/P&gt;&lt;P&gt;always has to nearest first value greater than or equal to 2 %.&amp;nbsp; and corresponding to that wind speed.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using below expression for the chart.num(Count({ $&amp;lt;Year={$(vMaxYear)}&amp;gt; }WIND_SPEED_DIST)/sum(total aggr(count(distinct { $&amp;lt;Year={$(vMaxYear)}&amp;gt; } POW_CURVE_DATE),WIND_SPEED_DIST)),'##.##%')&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;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="clipboard_image_0.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/21680iEAAC46EFE6466375/image-size/medium?v=v2&amp;amp;px=400" role="button" title="clipboard_image_0.png" alt="clipboard_image_0.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Oct 2019 12:46:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Reference-line-in-bar-chart/m-p/1636071#M446797</guid>
      <dc:creator>sandeep_b</dc:creator>
      <dc:date>2019-10-16T12:46:20Z</dc:date>
    </item>
    <item>
      <title>Re: Reference line in bar chart</title>
      <link>https://community.qlik.com/t5/QlikView/Reference-line-in-bar-chart/m-p/1637846#M446957</link>
      <description>&lt;P&gt;Hello Sandeep,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for the brainteaser!&lt;/P&gt;&lt;P&gt;Few challenges I faced on the way:&lt;/P&gt;&lt;P&gt;1. It's good that your dimension is a numeric value (otherwise you need to use an indexation in the back-end prior to building your chart)&lt;/P&gt;&lt;P&gt;2. There are null values in the data set attached (make sure you use set expression to filter them out)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I used combo chart with the following expression for value of the bar:&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;Count(DATE)/Count(TOTAL DATE)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Make sure in the Axes section -&amp;gt; Dimension Axis pane -&amp;gt; Continuous is checked&lt;/P&gt;&lt;P&gt;Here is the solution (this expression as a Reference line -&amp;gt; Presentation -&amp;gt; Reference Lines) :&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;=&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;Len(&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;KeepChar(&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;SubField(&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;Concat(Aggr(ROUND(Count({&amp;lt;WIND_SPEED_DIST={'*'}&amp;gt;} DATE)/Count({&amp;lt;WIND_SPEED_DIST={'*'}&amp;gt;} TOTAL DATE), '0.00001'), WIND_SPEED_DIST), ';',WIND_SPEED_DIST)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;ROUND(Min(&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;Aggr(&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;IF(Count({&amp;lt;WIND_SPEED_DIST={'*'}&amp;gt;} DATE)/Count({&amp;lt;WIND_SPEED_DIST={'*'}&amp;gt;} TOTAL DATE)-0.02&amp;gt;0, Count({&amp;lt;WIND_SPEED_DIST={'*'}&amp;gt;} DATE)/Count({&amp;lt;WIND_SPEED_DIST={'*'}&amp;gt;} TOTAL DATE))&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;,WIND_SPEED_DIST&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;), '0.00001')&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;, ';')&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;+Min(WIND_SPEED_DIST)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In general, we need to first calculate whichever is the value closest but still &amp;gt;= to 2%.&lt;/P&gt;&lt;P&gt;Then we need to artificially plot all values of the % distribution and find where in this sequence is our value to identify whichever the dimension value is. Then we count our indexation symbol occurrences to find which is the exact dimension value.&lt;/P&gt;&lt;P&gt;Results:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/22010iA49B8A9D6EFAA9A8/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/22011i165A9B0A793FB60F/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/22013i0D4554A04C5BB376/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let me know if this helps!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;S.T.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2019 13:37:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Reference-line-in-bar-chart/m-p/1637846#M446957</guid>
      <dc:creator>Stoyan_Terziev</dc:creator>
      <dc:date>2019-10-21T13:37:38Z</dc:date>
    </item>
    <item>
      <title>Re: Reference line in bar chart</title>
      <link>https://community.qlik.com/t5/QlikView/Reference-line-in-bar-chart/m-p/1639137#M447054</link>
      <description>&lt;P&gt;Sandeep, did&amp;nbsp;&lt;SPAN&gt;Stoyan's post help you get what you needed?&amp;nbsp; If so, do not forget to come back and use the Accept as Solution button on his post to give him credit and let others know it worked.&amp;nbsp; If you are still working upon things, leave an update for us.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Regards,&lt;BR /&gt;Brett&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Oct 2019 17:24:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Reference-line-in-bar-chart/m-p/1639137#M447054</guid>
      <dc:creator>Brett_Bleess</dc:creator>
      <dc:date>2019-10-23T17:24:41Z</dc:date>
    </item>
  </channel>
</rss>

