<?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: Overlaying a bell curve on a histogram using DAX in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Overlaying-a-bell-curve-on-a-histogram-using-DAX/m-p/1285631#M22005</link>
    <description>&lt;P&gt;I looked at your pbix.&amp;nbsp; I think the best way to do this is to add another calculated column to your Number Filtering 2 table to calculate the normal distribution value for that range using an expression like this one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;NormDist =
VAR avgval = ( 'Number filtering 2'[Start] + 'Number filtering 2'[End] ) / 2
VAR mean =
    AVERAGE ( 'D4142 0,75 inch 2020'[UTS Values] )
VAR std =
    STDEV.P ( 'D4142 0,75 inch 2020'[UTS Values] )
VAR nd =
    NORM.DIST ( avgval, mean, std, 0 )
RETURN
    nd&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can then add that to your visual to get the below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does that get you what you need?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this works for you, please mark it as the solution.&amp;nbsp; Kudos are appreciated too.&amp;nbsp; Please let me know if not.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Pat&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 10 Aug 2020 23:12:19 GMT</pubDate>
    <dc:creator>mahoneypat</dc:creator>
    <dc:date>2020-08-10T23:12:19Z</dc:date>
    <item>
      <title>Overlaying a bell curve on a histogram using DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Overlaying-a-bell-curve-on-a-histogram-using-DAX/m-p/1282563#M21899</link>
      <description>&lt;P&gt;Hi all! Noob here, so apologize if a similar thread already exists! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="_1qeIAgB0cPwnLhDF9XSiJM"&gt;I'm stuck with the following issue:&lt;BR /&gt;As you can see in the 1st pic. below I've plotted a histogram using a line &amp;amp; clustered chart. So far, all good.&lt;BR /&gt;Now if try to plot the Gaussian Distribution on the same graph, I get errors saying there needs to be a relationship between the columns.&lt;BR /&gt;I tried linking my&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;"f(values)"&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;column from the "&lt;EM&gt;UTS ND&lt;/EM&gt;" table to the calculated column of&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;"Start"&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;from my "&lt;EM&gt;UTS filtering&lt;/EM&gt;" table as it seemed the logical thing to do using a 1 to Many relationship, but the program doesn't allow because of a circular dependency.&lt;BR /&gt;Had anyone else experienced a similar issue before? If so, how did you manage to overcome it?&lt;BR /&gt;This is a job-related task that I've been struggling with for the past few days &amp;amp; I've ran out of ideas. :'(&lt;BR /&gt;Thank you for every little bit of information!&lt;BR /&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="_1qeIAgB0cPwnLhDF9XSiJM"&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="_1qeIAgB0cPwnLhDF9XSiJM"&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="_2-UiOdhyj4wHBv7Rc2FeDr c1cmiB1jfdq4sxidlPDAx"&gt;&lt;DIV class="_3Oa0THmZ3f5iZXAQ0hBJ0k _2LjgQiHLCZ9LDbCQx5KaOi"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Sun, 09 Aug 2020 15:21:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Overlaying-a-bell-curve-on-a-histogram-using-DAX/m-p/1282563#M21899</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-08-09T15:21:42Z</dc:date>
    </item>
    <item>
      <title>Re: Overlaying a bell curve on a histogram using DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Overlaying-a-bell-curve-on-a-histogram-using-DAX/m-p/1282648#M21904</link>
      <description>&lt;P&gt;What's the point of P3?&amp;nbsp; You could put the same value in the column and line&amp;nbsp; sinks,&amp;nbsp; but all it would do is showing the same information in a different format?&lt;/P&gt;</description>
      <pubDate>Sun, 09 Aug 2020 18:07:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Overlaying-a-bell-curve-on-a-histogram-using-DAX/m-p/1282648#M21904</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2020-08-09T18:07:21Z</dc:date>
    </item>
    <item>
      <title>Re: Overlaying a bell curve on a histogram using DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Overlaying-a-bell-curve-on-a-histogram-using-DAX/m-p/1282685#M21906</link>
      <description>&lt;P&gt;So instead of that table, I want to show on the graph the bell curve alongside with the bar chart I've already plotted.&amp;nbsp;&lt;BR /&gt;P2 was like an intermediate step.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 09 Aug 2020 19:08:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Overlaying-a-bell-curve-on-a-histogram-using-DAX/m-p/1282685#M21906</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-08-09T19:08:15Z</dc:date>
    </item>
    <item>
      <title>Re: Overlaying a bell curve on a histogram using DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Overlaying-a-bell-curve-on-a-histogram-using-DAX/m-p/1282701#M21907</link>
      <description>&lt;P&gt;If you can provide a link to your pbix, I'm sure this is doable.&amp;nbsp; You can also use TREATAS() to pass the filter from one table to the other (e.g., to get the x value to go into the gaussian calculation for that category).&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sqlbi.com/articles/propagate-filters-using-treatas-in-dax/" target="_blank"&gt;https://www.sqlbi.com/articles/propagate-filters-using-treatas-in-dax/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this works for you, please mark it as the solution.&amp;nbsp; Kudos are appreciated too.&amp;nbsp; Please let me know if not.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Pat&lt;/P&gt;</description>
      <pubDate>Sun, 09 Aug 2020 19:22:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Overlaying-a-bell-curve-on-a-histogram-using-DAX/m-p/1282701#M21907</guid>
      <dc:creator>mahoneypat</dc:creator>
      <dc:date>2020-08-09T19:22:42Z</dc:date>
    </item>
    <item>
      <title>Re: Overlaying a bell curve on a histogram using DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Overlaying-a-bell-curve-on-a-histogram-using-DAX/m-p/1282708#M21909</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;Seems like you would want to use NORM.DIST.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since I see you are a New Member,&amp;nbsp;Please first check if your issue is a common issue listed here: &lt;A href="https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882" target="_blank"&gt;https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Also, please see this post regarding How to Get Your Question Answered Quickly: &lt;A href="https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490" target="_blank"&gt;https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;The most important parts are:&lt;BR /&gt;1. Sample data as text, use the table tool in the editing bar&lt;BR /&gt;2. Expected output from sample data&lt;BR /&gt;3. Explanation in words of how to get from 1. to 2.&lt;/P&gt;</description>
      <pubDate>Sun, 09 Aug 2020 19:26:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Overlaying-a-bell-curve-on-a-histogram-using-DAX/m-p/1282708#M21909</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2020-08-09T19:26:14Z</dc:date>
    </item>
    <item>
      <title>Re: Overlaying a bell curve on a histogram using DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Overlaying-a-bell-curve-on-a-histogram-using-DAX/m-p/1283296#M21922</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="226208" data-lia-user-login="mahoneypat" class="lia-mention lia-mention-user"&gt;mahoneypat&lt;/a&gt;&amp;nbsp;here's the link to the file:&amp;nbsp;&lt;A href="https://drive.google.com/file/d/1U3TI-SkTyC8CuP2zzs-Js66qJUEV4j33/view?usp=sharing" target="_blank"&gt;https://drive.google.com/file/d/1U3TI-SkTyC8CuP2zzs-Js66qJUEV4j33/view?usp=sharing&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;If you have time &amp;amp; can have a look at it.... &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Aug 2020 04:52:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Overlaying-a-bell-curve-on-a-histogram-using-DAX/m-p/1283296#M21922</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-08-10T04:52:27Z</dc:date>
    </item>
    <item>
      <title>Re: Overlaying a bell curve on a histogram using DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Overlaying-a-bell-curve-on-a-histogram-using-DAX/m-p/1285124#M21978</link>
      <description>I'm not sure but if you put ranges (which are text) on the x-axis, then you'll never get a beautiful smooth gaussian line overlaid on the bar chart. I think for something like that you'll need a custom visual. Might be wrong but this is my strong feeling based on experience as well... You can get a line that's made of connected straight line segments but not a smooth gaussian line.</description>
      <pubDate>Mon, 10 Aug 2020 17:32:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Overlaying-a-bell-curve-on-a-histogram-using-DAX/m-p/1285124#M21978</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-08-10T17:32:46Z</dc:date>
    </item>
    <item>
      <title>Re: Overlaying a bell curve on a histogram using DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Overlaying-a-bell-curve-on-a-histogram-using-DAX/m-p/1285631#M22005</link>
      <description>&lt;P&gt;I looked at your pbix.&amp;nbsp; I think the best way to do this is to add another calculated column to your Number Filtering 2 table to calculate the normal distribution value for that range using an expression like this one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;NormDist =
VAR avgval = ( 'Number filtering 2'[Start] + 'Number filtering 2'[End] ) / 2
VAR mean =
    AVERAGE ( 'D4142 0,75 inch 2020'[UTS Values] )
VAR std =
    STDEV.P ( 'D4142 0,75 inch 2020'[UTS Values] )
VAR nd =
    NORM.DIST ( avgval, mean, std, 0 )
RETURN
    nd&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can then add that to your visual to get the below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does that get you what you need?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this works for you, please mark it as the solution.&amp;nbsp; Kudos are appreciated too.&amp;nbsp; Please let me know if not.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Pat&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Aug 2020 23:12:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Overlaying-a-bell-curve-on-a-histogram-using-DAX/m-p/1285631#M22005</guid>
      <dc:creator>mahoneypat</dc:creator>
      <dc:date>2020-08-10T23:12:19Z</dc:date>
    </item>
    <item>
      <title>Re: Overlaying a bell curve on a histogram using DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Overlaying-a-bell-curve-on-a-histogram-using-DAX/m-p/1286380#M22037</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="226208" data-lia-user-login="mahoneypat" class="lia-mention lia-mention-user"&gt;mahoneypat&lt;/a&gt;&amp;nbsp;hi there. Eventually yesterday after I sent you the link I've figured out myself after I've created a measure in the main table for my normal distribution &amp;amp; plotted it in my graph on the secondary Y axis.&amp;nbsp;&lt;BR /&gt;Your approach works just fine, too!&amp;nbsp;&lt;BR /&gt;Thank you to all of you for the suggestions. ^_^&lt;BR /&gt;The moderators can close the thread now!&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Aug 2020 06:32:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Overlaying-a-bell-curve-on-a-histogram-using-DAX/m-p/1286380#M22037</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-08-11T06:32:26Z</dc:date>
    </item>
    <item>
      <title>Re: Overlaying a bell curve on a histogram using DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Overlaying-a-bell-curve-on-a-histogram-using-DAX/m-p/2376326#M61217</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="226208" data-lia-user-login="mahoneypat" class="lia-mention lia-mention-user"&gt;mahoneypat&lt;/a&gt;&amp;nbsp; how did you overlay the distribution directly into the histogram? Where can I inject the distribution curve and what histogram app visual did you use? Im quite new to powerbi and tempted to just use python at this point.&lt;/P&gt;</description>
      <pubDate>Sat, 05 Mar 2022 12:07:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Overlaying-a-bell-curve-on-a-histogram-using-DAX/m-p/2376326#M61217</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-03-05T12:07:38Z</dc:date>
    </item>
    <item>
      <title>Re: Overlaying a bell curve on a histogram using DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Overlaying-a-bell-curve-on-a-histogram-using-DAX/m-p/2376346#M61220</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp;I looked for the original file to share it here, but I must have deleted it. The link to the file shared here is no longer valid either. However, I added the provided calculated column, and then I probably just used the line and clustered column chart (one of the native visuals).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Pat&lt;/P&gt;</description>
      <pubDate>Sat, 05 Mar 2022 12:55:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Overlaying-a-bell-curve-on-a-histogram-using-DAX/m-p/2376346#M61220</guid>
      <dc:creator>mahoneypat</dc:creator>
      <dc:date>2022-03-05T12:55:28Z</dc:date>
    </item>
    <item>
      <title>Re: Overlaying a bell curve on a histogram using DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Overlaying-a-bell-curve-on-a-histogram-using-DAX/m-p/2376522#M61234</link>
      <description>&lt;P&gt;I think I might understand, did you add this as a measure or column in Power BI&lt;BR /&gt;What exactly is the `avgval ` in your variable. Is that just the column range?&lt;/P&gt;</description>
      <pubDate>Sat, 05 Mar 2022 17:49:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Overlaying-a-bell-curve-on-a-histogram-using-DAX/m-p/2376522#M61234</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-03-05T17:49:49Z</dc:date>
    </item>
    <item>
      <title>Re: Overlaying a bell curve on a histogram using DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Overlaying-a-bell-curve-on-a-histogram-using-DAX/m-p/2376526#M61235</link>
      <description>&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;I tried using your formula and got this. Its bimodal and very small amplitudes. Is it because Im categorizing&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="226208" data-lia-user-login="mahoneypat" class="lia-mention lia-mention-user"&gt;mahoneypat&lt;/a&gt;&amp;nbsp;?&lt;/P&gt;</description>
      <pubDate>Sat, 05 Mar 2022 18:01:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Overlaying-a-bell-curve-on-a-histogram-using-DAX/m-p/2376526#M61235</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-03-05T18:01:35Z</dc:date>
    </item>
    <item>
      <title>Re: Overlaying a bell curve on a histogram using DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Overlaying-a-bell-curve-on-a-histogram-using-DAX/m-p/2376666#M61250</link>
      <description>&lt;P&gt;Do you have the distribution data in a separate table? The expression above is a calculated column, and the avgval variable is just the average value on a given row. The next two variables calculate the average and stdev of the values in the other table (your distribution). The Norm.Dist then returns a value (from 0 to 1) on where the average on that row falls in that distribution.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Of course, you could use the values from the original column (instead of having a 2nd table) to get the gaussian from their avg and stdev.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Pat&lt;/P&gt;</description>
      <pubDate>Sat, 05 Mar 2022 22:39:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Overlaying-a-bell-curve-on-a-histogram-using-DAX/m-p/2376666#M61250</guid>
      <dc:creator>mahoneypat</dc:creator>
      <dc:date>2022-03-05T22:39:49Z</dc:date>
    </item>
    <item>
      <title>Re: Overlaying a bell curve on a histogram using DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Overlaying-a-bell-curve-on-a-histogram-using-DAX/m-p/2376672#M61251</link>
      <description>&lt;P&gt;Pat thanks for the quick responses.&lt;BR /&gt;&lt;BR /&gt;Im unsure, do I need to generate the distribution data?&lt;BR /&gt;&lt;BR /&gt;Here is the formula I used to create a calculated column:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Do I just set the avgvalue to the currentcolumn?&lt;/P&gt;</description>
      <pubDate>Sat, 05 Mar 2022 22:45:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Overlaying-a-bell-curve-on-a-histogram-using-DAX/m-p/2376672#M61251</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-03-05T22:45:37Z</dc:date>
    </item>
  </channel>
</rss>

