<?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: StDev discrepancy when using similar tables in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/StDev-discrepancy-when-using-similar-tables/m-p/3442134#M130786</link>
    <description>&lt;P&gt;In your TEST table each failure has its own row, therefore the standard deviation is computed across all these 1 values. You need to use STDEV&lt;STRONG&gt;X&lt;/STRONG&gt;.P rather than STDEV.P&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Having said that I can only get half of it to work.&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;</description>
    <pubDate>Thu, 21 Sep 2023 21:46:08 GMT</pubDate>
    <dc:creator>lbendlin</dc:creator>
    <dc:date>2023-09-21T21:46:08Z</dc:date>
    <item>
      <title>StDev discrepancy when using similar tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/StDev-discrepancy-when-using-similar-tables/m-p/3438747#M130533</link>
      <description>&lt;P&gt;I wasn't exactly sure how to word my problem to make it stand out from similar but different issues.&amp;nbsp; Anyway, I have a DAX table that I created and it works flawlessly but I was recently asked if I could add an additional column, a unique ID, to the table but when I did, it throws my StDev off, therefore throwing off my Z-Score and I'm not sure how to fix it.&lt;BR /&gt;Below is the Expected vs Incorrect output columns.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;The measure I'm using for the Expected Output visual is as follows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;StDev_24_TEST = 
CALCULATE(STDEV.P('24MonthTable'[Failures]),
               DATESINPERIOD('24MonthTable'[Month-Year],
               LASTDATE('24MonthTable'[Month-Year])-1,
               -24, Month
          )
     )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;I tried using the same measure for my "duplicate" table but it returned all 0's.&amp;nbsp; I tried several different methods and all but one variation returned 0.0.&amp;nbsp; The measure that "somewhat" worked, and I use that term very loosely was:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;STD24 = 
VAR s =
    CALCULATE(
        STDEV.P('TEST'[Failures]),
        ALL('TEST'),                   -- Remove any other filters on 'TEST'
        DATESINPERIOD(
            'TEST'[Month-Year],
            LASTDATE('TEST'[Month-Year]) - 1,
            -24,
            MONTH
        )
    )
RETURN
    s&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The ONLY difference between the tables is one column, [PR ID] which I was planning on using to link to other tables because it's a unique identifier.&amp;nbsp; &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Sep 2023 19:01:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/StDev-discrepancy-when-using-similar-tables/m-p/3438747#M130533</guid>
      <dc:creator>TMO_KY</dc:creator>
      <dc:date>2023-09-19T19:01:25Z</dc:date>
    </item>
    <item>
      <title>Re: StDev discrepancy when using similar tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/StDev-discrepancy-when-using-similar-tables/m-p/3440783#M130679</link>
      <description>&lt;P&gt;Please provide sample data (with sensitive information removed) that covers your issue or question completely, in a usable format (not as a screenshot). Leave out anything not related to the issue.&lt;BR /&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216&lt;/A&gt; &lt;BR /&gt;Please show the expected outcome based on the sample data you provided. &lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Sep 2023 01:49:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/StDev-discrepancy-when-using-similar-tables/m-p/3440783#M130679</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2023-09-21T01:49:20Z</dc:date>
    </item>
    <item>
      <title>Re: StDev discrepancy when using similar tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/StDev-discrepancy-when-using-similar-tables/m-p/3441522#M130749</link>
      <description>&lt;P&gt;Ive uploaded a pbix file with sample data to my dropbox.&amp;nbsp; Hope this helps.&lt;BR /&gt;&lt;BR /&gt;&lt;A title="StDev Question" href="https://www.dropbox.com/scl/fi/zsso12il8kfaba612zlcl/StDev_Question.pbix?rlkey=4aoibz5uh2sxokqwibyo3jepy&amp;amp;dl=0" target="_blank" rel="noopener"&gt;StDev_SampleData.pbix&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Sep 2023 12:36:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/StDev-discrepancy-when-using-similar-tables/m-p/3441522#M130749</guid>
      <dc:creator>TMO_KY</dc:creator>
      <dc:date>2023-09-21T12:36:53Z</dc:date>
    </item>
    <item>
      <title>Re: StDev discrepancy when using similar tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/StDev-discrepancy-when-using-similar-tables/m-p/3442134#M130786</link>
      <description>&lt;P&gt;In your TEST table each failure has its own row, therefore the standard deviation is computed across all these 1 values. You need to use STDEV&lt;STRONG&gt;X&lt;/STRONG&gt;.P rather than STDEV.P&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Having said that I can only get half of it to work.&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;</description>
      <pubDate>Thu, 21 Sep 2023 21:46:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/StDev-discrepancy-when-using-similar-tables/m-p/3442134#M130786</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2023-09-21T21:46:08Z</dc:date>
    </item>
    <item>
      <title>Re: StDev discrepancy when using similar tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/StDev-discrepancy-when-using-similar-tables/m-p/3443008#M130840</link>
      <description>&lt;P&gt;That's more than where I was able to get so I appreciate it.&amp;nbsp; I'll have to talk to my end user and get their thoughts. if the Product Family will be in a visual or not.&amp;nbsp; I know it's used as a filter sometimes but not always.&lt;BR /&gt;&lt;BR /&gt;What if there was a sum measure for the Failures in the test table and do the stdevx against a measure?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Sep 2023 12:19:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/StDev-discrepancy-when-using-similar-tables/m-p/3443008#M130840</guid>
      <dc:creator>TMO_KY</dc:creator>
      <dc:date>2023-09-22T12:19:16Z</dc:date>
    </item>
    <item>
      <title>Re: StDev discrepancy when using similar tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/StDev-discrepancy-when-using-similar-tables/m-p/3443036#M130843</link>
      <description>&lt;P&gt;I think that should work, as long as that measure evaluates for each row of the table argument in STDEVX.P .&amp;nbsp; The trick here is to present a suitable table - which can also be a table variable.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Sep 2023 12:29:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/StDev-discrepancy-when-using-similar-tables/m-p/3443036#M130843</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2023-09-22T12:29:08Z</dc:date>
    </item>
    <item>
      <title>Re: StDev discrepancy when using similar tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/StDev-discrepancy-when-using-similar-tables/m-p/3443044#M130844</link>
      <description>&lt;P&gt;I appreciate the insight.....and I need to see what's going on, your suggestion worked for the data I provided (hard-coded in query) but once put in with live data, it throws different values, even when filtered, and all data types are the same.&amp;nbsp; Either way, I appreciate the help and quick responses.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Sep 2023 12:33:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/StDev-discrepancy-when-using-similar-tables/m-p/3443044#M130844</guid>
      <dc:creator>TMO_KY</dc:creator>
      <dc:date>2023-09-22T12:33:20Z</dc:date>
    </item>
  </channel>
</rss>

