<?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: average, std deviation and Z statistic in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/average-std-deviation-and-Z-statistic/m-p/3864365#M150964</link>
    <description>&lt;P&gt;Hi&amp;nbsp; &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="704899" data-lia-user-login="mitchellericio" class="lia-mention lia-mention-user"&gt;mitchellericio&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are you referring to customizing the values based on the Column of the matrix, which you can do with the Switch function.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure =
SWITCH(
    TRUE(),
    MAX('Table'[Manual])="Zstat",1,
    MAX('Table'[Manual])="Quote/HC",2,
    MAX('Table'[Manual])="AvgQuotes/HC",3,
    MAX('Table'[Manual])="Zstat",4)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data. We can better understand the problem and help you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Liu Yang&lt;/P&gt;
&lt;P&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;EM&gt;Accept it as the solution&lt;/EM&gt; to help the other members find it more quickly.&lt;/P&gt;</description>
    <pubDate>Wed, 24 Apr 2024 06:28:48 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-04-24T06:28:48Z</dc:date>
    <item>
      <title>average, std deviation and Z statistic</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/average-std-deviation-and-Z-statistic/m-p/3860643#M150816</link>
      <description>&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to do some analysis on volumes per headcount on our data. Put in the DAX measures but somehow it is not agreeing with the manual formula checks am doing.&amp;nbsp; Currently the data model is in Power Pivot in excel.&lt;/P&gt;&lt;P&gt;Here is a snipshot of the pivot and the manual computation I did( below the pivot).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;DAX formulas:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;!--  StartFragment   --&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;Quotes / HC:=&lt;/SPAN&gt;&lt;SPAN class=""&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN class=""&gt;(&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;DIVIDE&lt;/SPAN&gt;&lt;SPAN class=""&gt;(&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;'Measures_Quotes Created'[Quotes_Created],&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;HeadCountMeasures[Total_NonSupHC],&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;),&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;YEAR&lt;/SPAN&gt;&lt;SPAN class=""&gt;(Months[Month]) = 2023&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;!--  EndFragment   --&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;!--  StartFragment   --&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;Avg_Quotes/HC:=&lt;/SPAN&gt;&lt;SPAN class=""&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN class=""&gt;(&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;DIVIDE&lt;/SPAN&gt;&lt;SPAN class=""&gt;(&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;SUMX&lt;/SPAN&gt;&lt;SPAN class=""&gt;(&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;'Volume Table',&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;DIVIDE&lt;/SPAN&gt;&lt;SPAN class=""&gt;(&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;'Volume Table'[Sum of Volume],&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;HeadCountMeasures[Total_NonSupHC],0)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;),&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;DISTINCTCOUNT&lt;/SPAN&gt;&lt;SPAN class=""&gt;(Months[Month]),&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;),&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;// Implement Filtering&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;ALL&lt;/SPAN&gt;&lt;SPAN class=""&gt;(Months[Month]),&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;YEAR&lt;/SPAN&gt;&lt;SPAN class=""&gt;(Months[Month]) = 2023,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;'Volume Table'[Attribute] = &lt;/SPAN&gt;&lt;SPAN class=""&gt;"Sum of Quotes Created"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;!--  EndFragment   --&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;!--  StartFragment   --&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;StdDev_Avg_Quotes/HC:=&lt;/SPAN&gt;&lt;SPAN class=""&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN class=""&gt;(&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;STDEVX.S&lt;/SPAN&gt;&lt;SPAN class=""&gt;(&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;'Volume Table',&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;DIVIDE&lt;/SPAN&gt;&lt;SPAN class=""&gt;(&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;'Volume Table'[Sum of Volume],&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;HeadCountMeasures[Total_NonSupHC],&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;),&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;// Implement Filtering&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;ALL&lt;/SPAN&gt;&lt;SPAN class=""&gt;(Months[Month]),&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;YEAR&lt;/SPAN&gt;&lt;SPAN class=""&gt;(Months[Month]) = 2023,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;'Volume Table'[Attribute] = &lt;/SPAN&gt;&lt;SPAN class=""&gt;"Sum of Quotes Created"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;!--  EndFragment   --&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;!--  StartFragment   --&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;zQuotes/HC:=&lt;/SPAN&gt;&lt;SPAN class=""&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN class=""&gt;(&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;DIVIDE&lt;/SPAN&gt;&lt;SPAN class=""&gt;(&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;DIVIDE&lt;/SPAN&gt;&lt;SPAN class=""&gt;(&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;'Measures_Quotes Created'[Quotes_Created],&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;HeadCountMeasures[Total_NonSupHC],&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;) - zMeasures_Quotes_Created[Avg_Quotes/HC],&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;zMeasures_Quotes_Created[StdDev_Avg_Quotes/HC],&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;0)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;!--  EndFragment   --&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The data model consist of a Volume table, a headcount table and the months (date) table.&lt;/P&gt;&lt;P&gt;Hope you can help me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Apr 2024 01:21:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/average-std-deviation-and-Z-statistic/m-p/3860643#M150816</guid>
      <dc:creator>mitchellericio</dc:creator>
      <dc:date>2024-04-23T01:21:51Z</dc:date>
    </item>
    <item>
      <title>Re: average, std deviation and Z statistic</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/average-std-deviation-and-Z-statistic/m-p/3864365#M150964</link>
      <description>&lt;P&gt;Hi&amp;nbsp; &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="704899" data-lia-user-login="mitchellericio" class="lia-mention lia-mention-user"&gt;mitchellericio&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are you referring to customizing the values based on the Column of the matrix, which you can do with the Switch function.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure =
SWITCH(
    TRUE(),
    MAX('Table'[Manual])="Zstat",1,
    MAX('Table'[Manual])="Quote/HC",2,
    MAX('Table'[Manual])="AvgQuotes/HC",3,
    MAX('Table'[Manual])="Zstat",4)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data. We can better understand the problem and help you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Liu Yang&lt;/P&gt;
&lt;P&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;EM&gt;Accept it as the solution&lt;/EM&gt; to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Apr 2024 06:28:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/average-std-deviation-and-Z-statistic/m-p/3864365#M150964</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-04-24T06:28:48Z</dc:date>
    </item>
  </channel>
</rss>

