<?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: *Help* Scaling a normal distribution plot to the bar chart maximum in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Help-Scaling-a-normal-distribution-plot-to-the-bar-chart-maximum/m-p/2143367#M93039</link>
    <description>&lt;P&gt;I took another stab at this a few moments ago and got it to work.&amp;nbsp; This was the solution to scale the bell curve to the highest individual bar on the raw data:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;=Only(NormDist(Round(WgtDiffPct,.001)&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; , $(vCPLMeanPct)&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; , $(vCPLSigmaPct)&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; ,0))&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; *Max(Total aggr(Count({$&amp;lt;facility_cd={'P'},report_production_date={"&amp;gt;=$(=MonthStart(Max(Today()),$(=(v_Months_To_Use))))&amp;lt;=$(=MonthEnd(Max(Today())))"},&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; WgtDiffPct={"&amp;gt;=-$(=(v_FilterPct))&amp;lt;=$(=(v_FilterPct))"}&amp;gt;} coil_no),WgtDiffPctRnd))&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; /Max(Total aggr(Only(NormDist(Round(WgtDiffPct,.001)&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; , $(vCPLMeanPct)&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; , $(vCPLSigmaPct)&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; ,0)),WgtDiffPctRnd))&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;The Total qualifier is needed to get one record (just the max) across all dimension values.&amp;nbsp; Works like a charm.&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="germanboxers_0-1701442045075.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/120905i01512FB16F02FC06/image-size/medium?v=v2&amp;amp;px=400" role="button" title="germanboxers_0-1701442045075.png" alt="germanboxers_0-1701442045075.png" /&gt;&lt;/span&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/DIV&gt;</description>
    <pubDate>Fri, 01 Dec 2023 14:47:53 GMT</pubDate>
    <dc:creator>germanboxers</dc:creator>
    <dc:date>2023-12-01T14:47:53Z</dc:date>
    <item>
      <title>*Help* Scaling a normal distribution plot to the bar chart maximum</title>
      <link>https://community.qlik.com/t5/App-Development/Help-Scaling-a-normal-distribution-plot-to-the-bar-chart-maximum/m-p/2142162#M92911</link>
      <description>&lt;P&gt;I am trying to scale a normal distribution plot to the maximum value of the bar chart.&amp;nbsp; I have charts like these for multiple manufacturing units and have used variable to allow the user to filter what to exclude (e.g. +/-10 % error, +/- 5% error, etc) and for how many months to review.&amp;nbsp; &lt;BR /&gt;&lt;BR /&gt;The below image is what I have so far.&amp;nbsp; It is achieved by using the NormDist function and multiplying it by a constant and the total count of coils.&amp;nbsp; I would like to scale it so the height of the Bell curve is exactly equal to the maximum bar.&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="germanboxers_0-1701210218899.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/120718i043595340E54422C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="germanboxers_0-1701210218899.png" alt="germanboxers_0-1701210218899.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;In excel I would just multiply it by the ratio of the highest bar divided by the largest value of the bell curve.&amp;nbsp; I'm not quite sure how to do that in Qlik.&amp;nbsp; &amp;nbsp;This is what I'm currently using to get the Bell curve above&lt;BR /&gt;&lt;BR /&gt;=Only(NormDist(Round(WgtDiffPct,.001)&lt;BR /&gt;&lt;BR /&gt;, $(vCPLMeanPct) &lt;BR /&gt;, $(vCPLSigmaPct)&lt;BR /&gt;,0)&lt;BR /&gt;&lt;BR /&gt;*.0012*(Count(total{$&amp;lt;facility_cd={'P'},report_production_date={"&amp;gt;=$(=MonthStart(Max(Today()),$(=(v_Months_To_Use))))&amp;lt;=$(=MonthEnd(Max(Today())))"},&lt;BR /&gt;WgtDiffPct={"&amp;gt;=-$(=(v_FilterPct))&amp;lt;=$(=(v_FilterPct))"}&amp;gt;} coil_no)))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I thought about using something like Max(Aggr(Count{...},Round(WgtDiffPct,.001))), but Qlik didn't like that.&amp;nbsp; I'm guessing that is because it sees Round(WgtDiffPct,.001) as a calculated dimension.&lt;/P&gt;
&lt;P&gt;Any suggestions on how to do this?&lt;/P&gt;
&lt;P&gt;Thanks a bunch!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2023 22:45:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Help-Scaling-a-normal-distribution-plot-to-the-bar-chart-maximum/m-p/2142162#M92911</guid>
      <dc:creator>germanboxers</dc:creator>
      <dc:date>2023-11-28T22:45:49Z</dc:date>
    </item>
    <item>
      <title>Re: *Help* Scaling a normal distribution plot to the bar chart maximum</title>
      <link>https://community.qlik.com/t5/App-Development/Help-Scaling-a-normal-distribution-plot-to-the-bar-chart-maximum/m-p/2143288#M93016</link>
      <description>&lt;P&gt;Anyone have any suggestions??&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Dec 2023 13:01:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Help-Scaling-a-normal-distribution-plot-to-the-bar-chart-maximum/m-p/2143288#M93016</guid>
      <dc:creator>germanboxers</dc:creator>
      <dc:date>2023-12-01T13:01:55Z</dc:date>
    </item>
    <item>
      <title>Re: *Help* Scaling a normal distribution plot to the bar chart maximum</title>
      <link>https://community.qlik.com/t5/App-Development/Help-Scaling-a-normal-distribution-plot-to-the-bar-chart-maximum/m-p/2143295#M93019</link>
      <description>&lt;P&gt;You may try as Bell-Expression a synchronizing-approach with something like:&lt;/P&gt;
&lt;P&gt;rangemin(Bell-Expression, CountCoils-Expression)&lt;/P&gt;</description>
      <pubDate>Fri, 01 Dec 2023 13:23:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Help-Scaling-a-normal-distribution-plot-to-the-bar-chart-maximum/m-p/2143295#M93019</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2023-12-01T13:23:36Z</dc:date>
    </item>
    <item>
      <title>Re: *Help* Scaling a normal distribution plot to the bar chart maximum</title>
      <link>https://community.qlik.com/t5/App-Development/Help-Scaling-a-normal-distribution-plot-to-the-bar-chart-maximum/m-p/2143357#M93035</link>
      <description>&lt;P&gt;Thanks Marcus.&amp;nbsp; I actually figured out how to do it this morning after I bumped the thread.&amp;nbsp; I'll post the solution in a moment.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Dec 2023 14:42:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Help-Scaling-a-normal-distribution-plot-to-the-bar-chart-maximum/m-p/2143357#M93035</guid>
      <dc:creator>germanboxers</dc:creator>
      <dc:date>2023-12-01T14:42:55Z</dc:date>
    </item>
    <item>
      <title>Re: *Help* Scaling a normal distribution plot to the bar chart maximum</title>
      <link>https://community.qlik.com/t5/App-Development/Help-Scaling-a-normal-distribution-plot-to-the-bar-chart-maximum/m-p/2143367#M93039</link>
      <description>&lt;P&gt;I took another stab at this a few moments ago and got it to work.&amp;nbsp; This was the solution to scale the bell curve to the highest individual bar on the raw data:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;=Only(NormDist(Round(WgtDiffPct,.001)&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; , $(vCPLMeanPct)&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; , $(vCPLSigmaPct)&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; ,0))&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; *Max(Total aggr(Count({$&amp;lt;facility_cd={'P'},report_production_date={"&amp;gt;=$(=MonthStart(Max(Today()),$(=(v_Months_To_Use))))&amp;lt;=$(=MonthEnd(Max(Today())))"},&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; WgtDiffPct={"&amp;gt;=-$(=(v_FilterPct))&amp;lt;=$(=(v_FilterPct))"}&amp;gt;} coil_no),WgtDiffPctRnd))&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; /Max(Total aggr(Only(NormDist(Round(WgtDiffPct,.001)&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; , $(vCPLMeanPct)&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; , $(vCPLSigmaPct)&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; ,0)),WgtDiffPctRnd))&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;The Total qualifier is needed to get one record (just the max) across all dimension values.&amp;nbsp; Works like a charm.&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="germanboxers_0-1701442045075.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/120905i01512FB16F02FC06/image-size/medium?v=v2&amp;amp;px=400" role="button" title="germanboxers_0-1701442045075.png" alt="germanboxers_0-1701442045075.png" /&gt;&lt;/span&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Fri, 01 Dec 2023 14:47:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Help-Scaling-a-normal-distribution-plot-to-the-bar-chart-maximum/m-p/2143367#M93039</guid>
      <dc:creator>germanboxers</dc:creator>
      <dc:date>2023-12-01T14:47:53Z</dc:date>
    </item>
  </channel>
</rss>

