<?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: Flag outliers in table visulization (one column of values) in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Flag-outliers-in-table-visulization-one-column-of-values/m-p/3398447#M128247</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am trying to flag outliers in a single column to determine which ones are different (on average) from the others. I have a column that would look similar to this:&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;the highlighted ones are the outliners, kindly help with a solution.&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 25 Aug 2023 06:32:08 GMT</pubDate>
    <dc:creator>Sawood</dc:creator>
    <dc:date>2023-08-25T06:32:08Z</dc:date>
    <item>
      <title>Flag outliers in table visulization (one column of values)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Flag-outliers-in-table-visulization-one-column-of-values/m-p/2771739#M86312</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am trying to flag outliers in a single column to determine which ones are different (on average) to the others. I have a column which would look similar to this:&lt;/P&gt;&lt;TABLE border="0" cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;2.979167&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;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gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2.993333&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2.974167&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2.965278&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2.996667&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2.993333&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;Here I would want to flag:&lt;/P&gt;&lt;P&gt;5.964722222&lt;/P&gt;&lt;P&gt;-0.020555556&lt;/P&gt;&lt;P&gt;15.57361111&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tired the following formulae, but it only seems to flag the 5.x value:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Outliers =&lt;/P&gt;&lt;P&gt;var avera = CALCULATE(AVERAGEX('Time Info','Time Info'[time difference]),'Time Info'[time difference] &amp;lt;&amp;gt; Blank())&lt;/P&gt;&lt;P&gt;var stdv = CALCULATE(STDEVX.P('Time Info','Time Info'[time difference]),'Time Info'[time difference] &amp;lt;&amp;gt; Blank())&lt;/P&gt;&lt;P&gt;return (SUMX('Time Info','Time Info'[time difference])- avera)/stdv&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to use the measure in 1 table to flag the outliers and in another to just show the outliers.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Thu, 15 Sep 2022 22:14:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Flag-outliers-in-table-visulization-one-column-of-values/m-p/2771739#M86312</guid>
      <dc:creator>AdamWhittaker</dc:creator>
      <dc:date>2022-09-15T22:14:34Z</dc:date>
    </item>
    <item>
      <title>Re: Flag outliers in table visulization (one column of values)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Flag-outliers-in-table-visulization-one-column-of-values/m-p/2771894#M86317</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="442720" data-lia-user-login="AdamWhittaker" class="lia-mention lia-mention-user"&gt;AdamWhittaker&lt;/a&gt;&amp;nbsp;Try:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Flag = 
    VAR __Avg = AVERAGEX(ALL('Table'),[Value])
    VAR __StdDev = STDEVX.P(ALL('Table'),[Value])
    VAR __Value = MAX('Table'[Value])
    VAR __High = __Avg + __StdDev
    VAR __Low = __Avg - __StdDev
RETURN
    IF(__Value &amp;gt; __High || __Value &amp;lt; __Low,1,0)&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 16 Sep 2022 01:08:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Flag-outliers-in-table-visulization-one-column-of-values/m-p/2771894#M86317</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2022-09-16T01:08:35Z</dc:date>
    </item>
    <item>
      <title>Re: Flag outliers in table visulization (one column of values)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Flag-outliers-in-table-visulization-one-column-of-values/m-p/2772290#M86344</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="442720" data-lia-user-login="AdamWhittaker" class="lia-mention lia-mention-user"&gt;AdamWhittaker&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;According to your description,you want to mark values that deviate from the mean. As for your way of judging cheap, my idea is that you can find the value closest to the mean and then define a rule (like deviating from that value by more than 10% mark it as a deviating value). Right?&lt;/P&gt;
&lt;P&gt;Here are the steps you can follow：&lt;/P&gt;
&lt;P&gt;(1)This is my test data:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&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;(2)We can create a measure : “flag”&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;flag = var _average=CALCULATE( AVERAGEX('test',[value]),'test'[value]&amp;lt;&amp;gt;BLANK(),ALL('test'))

var _table = SUMMARIZE( ALL('test') , 'test'[value] ,"abs", ABS( _average-[value]))

var _min_abs = MINX(_table , [abs])

var _t_min_value =SELECTCOLUMNS( FILTER( _table , [abs] =_min_abs ) ,"value" , [value] )

var _close_value = AVERAGEX(_t_min_value , [value])

return

IF( MAX('test'[value]) &amp;lt; _close_value*1.1 &amp;amp;&amp;amp;MAX('test'[value])&amp;gt; _close_value * 0.9 ,1,0)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(3) Then we can meet your need , the result is as follows:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this method does not meet your needs, you can provide us with your special &lt;STRONG&gt;sample data&lt;/STRONG&gt; and the &lt;STRONG&gt;desired output sample&lt;/STRONG&gt; data in the form of &lt;STRONG&gt;tables&lt;/STRONG&gt;, so that we can better help you solve the problem.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Aniya Zhang&lt;/P&gt;
&lt;P&gt;If this post&amp;nbsp;&lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept&lt;/EM&gt;&lt;/STRONG&gt;&lt;EM&gt; it as the solution&lt;/EM&gt;&amp;nbsp;to help the other members find it more quickly&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 05:40:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Flag-outliers-in-table-visulization-one-column-of-values/m-p/2772290#M86344</guid>
      <dc:creator>v-yueyunzh-msft</dc:creator>
      <dc:date>2022-09-16T05:40:24Z</dc:date>
    </item>
    <item>
      <title>Re: Flag outliers in table visulization (one column of values)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Flag-outliers-in-table-visulization-one-column-of-values/m-p/2774686#M86546</link>
      <description>&lt;P&gt;Hi Aniya, thank you very much for the explaination and code, i ended up using both yours and&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="313" data-lia-user-login="Greg_Deckler" class="lia-mention lia-mention-user"&gt;Greg_Deckler&lt;/a&gt;&amp;nbsp;with a bit more summarizing and got what i needed.&amp;nbsp; Not sure who's to accept &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; Thanks again.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 22:21:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Flag-outliers-in-table-visulization-one-column-of-values/m-p/2774686#M86546</guid>
      <dc:creator>AdamWhittaker</dc:creator>
      <dc:date>2022-09-16T22:21:55Z</dc:date>
    </item>
    <item>
      <title>Re: Flag outliers in table visulization (one column of values)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Flag-outliers-in-table-visulization-one-column-of-values/m-p/2774687#M86547</link>
      <description>&lt;P&gt;Hi Greg, thank you very much for the code, i ended up using both yours and&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="433015" data-lia-user-login="v-yueyunzh-msft" class="lia-mention lia-mention-user"&gt;v-yueyunzh-msft&lt;/a&gt;&amp;nbsp;with a bit more summarizing and got what i needed.&amp;nbsp; Not sure who's to accept &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; Thanks again.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 22:22:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Flag-outliers-in-table-visulization-one-column-of-values/m-p/2774687#M86547</guid>
      <dc:creator>AdamWhittaker</dc:creator>
      <dc:date>2022-09-16T22:22:57Z</dc:date>
    </item>
    <item>
      <title>Re: Flag outliers in table visulization (one column of values)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Flag-outliers-in-table-visulization-one-column-of-values/m-p/3398447#M128247</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am trying to flag outliers in a single column to determine which ones are different (on average) from the others. I have a column that would look similar to this:&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;the highlighted ones are the outliners, kindly help with a solution.&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Aug 2023 06:32:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Flag-outliers-in-table-visulization-one-column-of-values/m-p/3398447#M128247</guid>
      <dc:creator>Sawood</dc:creator>
      <dc:date>2023-08-25T06:32:08Z</dc:date>
    </item>
  </channel>
</rss>

