<?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 App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Reference-line-in-Bar-Chart/m-p/2116358#M91095</link>
    <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/242282"&gt;@Sohan_Patil&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;works perfect&lt;/P&gt;
&lt;P&gt;Many thanks&lt;/P&gt;</description>
    <pubDate>Wed, 13 Sep 2023 07:51:04 GMT</pubDate>
    <dc:creator>Sharbel</dc:creator>
    <dc:date>2023-09-13T07:51:04Z</dc:date>
    <item>
      <title>Reference line in Bar Chart</title>
      <link>https://community.qlik.com/t5/App-Development/Reference-line-in-Bar-Chart/m-p/2115169#M91006</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I have the following bar chart:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Sharbel_2-1694263795908.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/115931iDE38F42C47D7602D/image-size/large?v=v2&amp;amp;px=999" role="button" title="Sharbel_2-1694263795908.png" alt="Sharbel_2-1694263795908.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;the x-axis in the chart above&amp;nbsp; shows date value in the highest hierarch (i.e Years), but it can also drill down to lower hierarchies such as Months and calendar days.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to add Reference line in the add-ons section (as shown below) that displays Average visits per Hierarchy, but unfortunately couldn't figure out how to calculate an average that is responsive to the hierarchy shown in the chart.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example:&lt;/P&gt;
&lt;P&gt;When the hierarch shown in the chart is Years (as displayed in the chart above) , then the reference line should show the value of&amp;nbsp; (430,292/14) = 30,735 visits&lt;/P&gt;
&lt;P&gt;and when we drill down to months in year 2022, then the Reference line should show the value of (34,654/12) =&amp;nbsp; 2,887 visits and so on for calendar day hierarchy.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Sharbel_1-1694262985946.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/115930i6BACC57ED23A7423/image-size/large?v=v2&amp;amp;px=999" role="button" title="Sharbel_1-1694262985946.png" alt="Sharbel_1-1694262985946.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;any ideas?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Sharbel&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 21:25:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Reference-line-in-Bar-Chart/m-p/2115169#M91006</guid>
      <dc:creator>Sharbel</dc:creator>
      <dc:date>2024-11-15T21:25:18Z</dc:date>
    </item>
    <item>
      <title>Re: Reference line in Bar Chart</title>
      <link>https://community.qlik.com/t5/App-Development/Reference-line-in-Bar-Chart/m-p/2115513#M91028</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;
&lt;P&gt;you cant add a reference line with an average mesure in a drill down dimension.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;when you swip between Years month or Date , you don't make a selection in this dimensions.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I will advise to create button with variable to swip between your period dimension Date, week , month etc&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then you will be able to add a reference line depending of the selected dimension in the variable.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Sep 2023 11:58:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Reference-line-in-Bar-Chart/m-p/2115513#M91028</guid>
      <dc:creator>brunobertels</dc:creator>
      <dc:date>2023-09-11T11:58:55Z</dc:date>
    </item>
    <item>
      <title>Re: Reference line in Bar Chart</title>
      <link>https://community.qlik.com/t5/App-Development/Reference-line-in-Bar-Chart/m-p/2115517#M91029</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Sample data of 3 years&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Sohan_Patil_0-1694433193721.png" style="width: 428px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/116031iFB8112B535F40ED7/image-dimensions/428x690?v=v2" width="428" height="690" role="button" title="Sohan_Patil_0-1694433193721.png" alt="Sohan_Patil_0-1694433193721.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Sohan_Patil_3-1694433535471.png" style="width: 564px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/116035iB01263BD311734A3/image-dimensions/564x273?v=v2" width="564" height="273" role="button" title="Sohan_Patil_3-1694433535471.png" alt="Sohan_Patil_3-1694433535471.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;after selecting year 2020 then&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Sohan_Patil_4-1694433573781.png" style="width: 708px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/116036iCF3E1B411AD3A2D5/image-dimensions/708x425?v=v2" width="708" height="425" role="button" title="Sohan_Patil_4-1694433573781.png" alt="Sohan_Patil_4-1694433573781.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;reference line expression :&amp;nbsp;&lt;/P&gt;
&lt;P&gt;=If(GetSelectedCount(Year)&amp;gt;0, sum(Visits)/count(distinct Month), sum(Visits)/count(distinct Year))&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>Mon, 11 Sep 2023 12:03:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Reference-line-in-Bar-Chart/m-p/2115517#M91029</guid>
      <dc:creator>Sohan_Patil</dc:creator>
      <dc:date>2023-09-11T12:03:55Z</dc:date>
    </item>
    <item>
      <title>Re: Reference line in Bar Chart</title>
      <link>https://community.qlik.com/t5/App-Development/Reference-line-in-Bar-Chart/m-p/2115649#M91038</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;the above expression seems to work on two layers of hierarchy ( Year, Month) ,&lt;/P&gt;
&lt;P&gt;what the expression would be in case i have three layers of hierarchy (Year, Month, Calendar day)?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sharbel&lt;/P&gt;</description>
      <pubDate>Mon, 11 Sep 2023 16:27:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Reference-line-in-Bar-Chart/m-p/2115649#M91038</guid>
      <dc:creator>Sharbel</dc:creator>
      <dc:date>2023-09-11T16:27:18Z</dc:date>
    </item>
    <item>
      <title>Re: Reference line in Bar Chart</title>
      <link>https://community.qlik.com/t5/App-Development/Reference-line-in-Bar-Chart/m-p/2116348#M91092</link>
      <description>&lt;P&gt;Hi.&lt;/P&gt;
&lt;P&gt;I have added one more field (Days) in the script&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Year 2019 and Month Apr is selected&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Sohan_Patil_0-1694589789441.png" style="width: 743px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/116181i3A4CC25BA3EDB20A/image-dimensions/743x392?v=v2" width="743" height="392" role="button" title="Sohan_Patil_0-1694589789441.png" alt="Sohan_Patil_0-1694589789441.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Reference line expression:&lt;/P&gt;
&lt;P&gt;=If(GetSelectedCount(Year)&amp;gt;0, if(GetSelectedCount(Month)&amp;gt;0,sum(Visits)/count(distinct Days),sum(Visits)/count(distinct Month)), sum(Visits)/count(distinct Year))&lt;/P&gt;</description>
      <pubDate>Wed, 13 Sep 2023 07:32:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Reference-line-in-Bar-Chart/m-p/2116348#M91092</guid>
      <dc:creator>Sohan_Patil</dc:creator>
      <dc:date>2023-09-13T07:32:59Z</dc:date>
    </item>
    <item>
      <title>Re: Reference line in Bar Chart</title>
      <link>https://community.qlik.com/t5/App-Development/Reference-line-in-Bar-Chart/m-p/2116358#M91095</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/242282"&gt;@Sohan_Patil&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;works perfect&lt;/P&gt;
&lt;P&gt;Many thanks&lt;/P&gt;</description>
      <pubDate>Wed, 13 Sep 2023 07:51:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Reference-line-in-Bar-Chart/m-p/2116358#M91095</guid>
      <dc:creator>Sharbel</dc:creator>
      <dc:date>2023-09-13T07:51:04Z</dc:date>
    </item>
  </channel>
</rss>

