<?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 by more values in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-by-more-values/m-p/2960509#M98567</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="473064" data-lia-user-login="hanygameel" class="lia-mention lia-mention-user"&gt;hanygameel&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please try&lt;/P&gt;
&lt;P&gt;Average Amount =&lt;BR /&gt;AVERAGEX (&lt;BR /&gt;FILTER (&lt;BR /&gt;SUMMARIZE (&lt;BR /&gt;'Table',&lt;BR /&gt;'Table'[Patient ID],&lt;BR /&gt;'Table'[Episode No.],&lt;BR /&gt;"@Amount", SUM ( 'Table'[Amount] )&lt;BR /&gt;),&lt;BR /&gt;[@Amount] &amp;gt; 0&lt;BR /&gt;),&lt;BR /&gt;[@Amount]&lt;BR /&gt;)&lt;/P&gt;</description>
    <pubDate>Sat, 10 Dec 2022 19:58:14 GMT</pubDate>
    <dc:creator>tamerj1</dc:creator>
    <dc:date>2022-12-10T19:58:14Z</dc:date>
    <item>
      <title>Average by more values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-by-more-values/m-p/2960265#M98534</link>
      <description>&lt;P&gt;i have table that have&lt;/P&gt;&lt;P&gt;Patient ID&amp;nbsp; &amp;nbsp;invoice no.&amp;nbsp; &amp;nbsp; &amp;nbsp; Doctor&amp;nbsp; &amp;nbsp; Service No.&amp;nbsp; Amount&amp;nbsp; &amp;nbsp;Episode No. ( visit No)&lt;/P&gt;&lt;P&gt;001&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 22-01&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 10&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 654&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 50&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 01&lt;/P&gt;&lt;P&gt;001&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 22-01&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 10&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;859&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;100&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 01&lt;/P&gt;&lt;P&gt;002&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 22-02&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 09&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 357&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;75&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;01&lt;/P&gt;&lt;P&gt;002&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 22-02&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 09&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 658&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;650&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;01&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Episode No. serial from 1 for each patient&lt;/P&gt;&lt;P&gt;how can i calculate average amount by Episode for each patient ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Dec 2022 11:34:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-by-more-values/m-p/2960265#M98534</guid>
      <dc:creator>hanygameel</dc:creator>
      <dc:date>2022-12-10T11:34:22Z</dc:date>
    </item>
    <item>
      <title>Re: Average by more values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-by-more-values/m-p/2960282#M98535</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="473064" data-lia-user-login="hanygameel" class="lia-mention lia-mention-user"&gt;hanygameel&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;try to create a measure with this:&lt;/P&gt;&lt;DIV&gt;AvgByPatientByEpisode =&lt;DIV&gt;AVERAGEX(&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; SUMMARIZE(&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;TableName,&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;TableName[Patient ID],&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;TableName[Episode No.]&lt;BR /&gt;&amp;nbsp; &amp;nbsp; ),&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; SUM(TableName[Amount]&lt;SPAN&gt;)&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;DIV&gt;)&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In case of failure, please provide more data to cover the complexity of your case.&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Dec 2022 11:52:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-by-more-values/m-p/2960282#M98535</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2022-12-10T11:52:35Z</dc:date>
    </item>
    <item>
      <title>Re: Average by more values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-by-more-values/m-p/2960354#M98544</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="473064" data-lia-user-login="hanygameel" class="lia-mention lia-mention-user"&gt;hanygameel&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;it depends of which column are you slicing by in your visual. If you are slicing by Patient ID then AVERAGE ( 'Table'[Amount] ) will do. Unless you need to sum the averages at the grand total level the you can use&lt;/P&gt;
&lt;P&gt;SIMX ( VALUES ( 'Table'[Patient ID] ), CALCULATE ( AVERAGE (&amp;nbsp;&lt;SPAN&gt;'Table'[Amount] ) ) )&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Dec 2022 14:30:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-by-more-values/m-p/2960354#M98544</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-12-10T14:30:13Z</dc:date>
    </item>
    <item>
      <title>Re: Average by more values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-by-more-values/m-p/2960505#M98564</link>
      <description>&lt;P&gt;Thanks for your quick response&lt;/P&gt;&lt;P&gt;it gives me the total amount&lt;/P&gt;</description>
      <pubDate>Sat, 10 Dec 2022 19:17:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-by-more-values/m-p/2960505#M98564</guid>
      <dc:creator>hanygameel</dc:creator>
      <dc:date>2022-12-10T19:17:26Z</dc:date>
    </item>
    <item>
      <title>Re: Average by more values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-by-more-values/m-p/2960507#M98565</link>
      <description>&lt;P&gt;I need to calculate the average episode amount for the doctor&lt;/P&gt;&lt;P&gt;in other way, I need the average amount paid by the patient in the episode ( doctor visit )&lt;/P&gt;</description>
      <pubDate>Sat, 10 Dec 2022 19:21:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-by-more-values/m-p/2960507#M98565</guid>
      <dc:creator>hanygameel</dc:creator>
      <dc:date>2022-12-10T19:21:20Z</dc:date>
    </item>
    <item>
      <title>Re: Average by more values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-by-more-values/m-p/2960508#M98566</link>
      <description>&lt;P&gt;Also, i need to exclude zero amount from the average calculation&lt;/P&gt;</description>
      <pubDate>Sat, 10 Dec 2022 19:26:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-by-more-values/m-p/2960508#M98566</guid>
      <dc:creator>hanygameel</dc:creator>
      <dc:date>2022-12-10T19:26:37Z</dc:date>
    </item>
    <item>
      <title>Re: Average by more values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-by-more-values/m-p/2960509#M98567</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="473064" data-lia-user-login="hanygameel" class="lia-mention lia-mention-user"&gt;hanygameel&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please try&lt;/P&gt;
&lt;P&gt;Average Amount =&lt;BR /&gt;AVERAGEX (&lt;BR /&gt;FILTER (&lt;BR /&gt;SUMMARIZE (&lt;BR /&gt;'Table',&lt;BR /&gt;'Table'[Patient ID],&lt;BR /&gt;'Table'[Episode No.],&lt;BR /&gt;"@Amount", SUM ( 'Table'[Amount] )&lt;BR /&gt;),&lt;BR /&gt;[@Amount] &amp;gt; 0&lt;BR /&gt;),&lt;BR /&gt;[@Amount]&lt;BR /&gt;)&lt;/P&gt;</description>
      <pubDate>Sat, 10 Dec 2022 19:58:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-by-more-values/m-p/2960509#M98567</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-12-10T19:58:14Z</dc:date>
    </item>
    <item>
      <title>Re: Average by more values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-by-more-values/m-p/2960750#M98589</link>
      <description>&lt;P&gt;i can not understand this&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 11 Dec 2022 08:28:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-by-more-values/m-p/2960750#M98589</guid>
      <dc:creator>hanygameel</dc:creator>
      <dc:date>2022-12-11T08:28:40Z</dc:date>
    </item>
    <item>
      <title>Re: Average by more values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-by-more-values/m-p/2960781#M98592</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="473064" data-lia-user-login="hanygameel" class="lia-mention lia-mention-user"&gt;hanygameel&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;You can add a column inside SUMMARIZE which is the SUM of the ammount aggregated at the Episode level (which is most probably one value) the FILTER will consider only the values that are above 0 the the averaging is performed.&amp;nbsp;&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Sun, 11 Dec 2022 10:34:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-by-more-values/m-p/2960781#M98592</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-12-11T10:34:39Z</dc:date>
    </item>
    <item>
      <title>Re: Average by more values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-by-more-values/m-p/2960782#M98593</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="473064" data-lia-user-login="hanygameel" class="lia-mention lia-mention-user"&gt;hanygameel&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;You can add a column inside SUMMARIZE which is the SUM of the ammount aggregated at the Episode level (which is most probably one value) the FILTER will consider only the values that are above 0 the the averaging is performed.&amp;nbsp;&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Sun, 11 Dec 2022 10:34:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-by-more-values/m-p/2960782#M98593</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-12-11T10:34:42Z</dc:date>
    </item>
    <item>
      <title>Re: Average by more values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-by-more-values/m-p/2960818#M98598</link>
      <description>&lt;P&gt;Thank you Very Much&lt;BR /&gt;i got it&lt;/P&gt;</description>
      <pubDate>Sun, 11 Dec 2022 13:49:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-by-more-values/m-p/2960818#M98598</guid>
      <dc:creator>hanygameel</dc:creator>
      <dc:date>2022-12-11T13:49:32Z</dc:date>
    </item>
  </channel>
</rss>

