<?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: Calculating Average while ignoring zero/null values in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Average-while-ignoring-zero-null-values/m-p/2886168#M93554</link>
    <description>&lt;P&gt;Thanks so much &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="291628" data-lia-user-login="Jihwan_Kim" class="lia-mention lia-mention-user"&gt;Jihwan_Kim&lt;/a&gt;&amp;nbsp;. It worked. I also need to find an average of conversion rate as follows. But the average is not accurate when it comes to the average conversion of of 'David' or 'Maya'. For David, it should be- 108.335 and for Maya-30.555&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is the updated PBI file-&lt;BR /&gt;&lt;A href="https://drive.google.com/file/d/1MPwUn89yxiUYwSWpJKispl7LesBJQd9Y/view?usp=share_link" target="_blank" rel="noopener"&gt;https://drive.google.com/file/d/1MPwUn89yxiUYwSWpJKispl7LesBJQd9Y/view?usp=share_link&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The Dataset-&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 04 Nov 2022 17:30:40 GMT</pubDate>
    <dc:creator>Green_Cloud</dc:creator>
    <dc:date>2022-11-04T17:30:40Z</dc:date>
    <item>
      <title>Calculating Average while ignoring zero/null values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Average-while-ignoring-zero-null-values/m-p/2884441#M93467</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to find out average based on the following dataset. But I just need to show the available month's value in the average when one of the month's value is null or zero. The formual I used for average is:&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;EM&gt;&lt;STRONG&gt;Two Month's Average&lt;/STRONG&gt; = ((CALCULATE(SUM([Working Hour]), FILTER('Sample','Sample'[Month]="February"))) + (CALCULATE(SUM([Working Hour]), FILTER('Sample','Sample'[Month]="March"))))/2&lt;/EM&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Dataset:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the current output as follows. But it is inaccurate when the filtered value is either 'Alex' or 'John' as they have zero working hours in one of the months. I need a dax which can ignore null/zero values. The desired average value for 'Alex' should be 4 and for 'John', it should be 3.&amp;nbsp;&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;Below is the Power BI file link-&lt;/P&gt;&lt;P&gt;&lt;A href="https://drive.google.com/file/d/1vRA6h82VIT7zvvtFczW3eJnr-gxXC-z2/view?usp=share_link" target="_blank" rel="noopener"&gt;https://drive.google.com/file/d/1vRA6h82VIT7zvvtFczW3eJnr-gxXC-z2/view?usp=share_link&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 04 Nov 2022 13:50:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Average-while-ignoring-zero-null-values/m-p/2884441#M93467</guid>
      <dc:creator>Green_Cloud</dc:creator>
      <dc:date>2022-11-04T13:50:17Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating Average while ignoring zero/null values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Average-while-ignoring-zero-null-values/m-p/2884482#M93470</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I am not sure if I understood your question correctly, but please try something like below.&lt;/P&gt;
&lt;P&gt;Please check the attached pbix file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Avg measure: = 
CALCULATE (
    AVERAGE ( 'Sample'[Working Hour] ),
    FILTER ( 'Sample', 'Sample'[Working Hour] &amp;lt;&amp;gt; 0 )
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Nov 2022 05:03:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Average-while-ignoring-zero-null-values/m-p/2884482#M93470</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2022-11-04T05:03:36Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating Average while ignoring zero/null values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Average-while-ignoring-zero-null-values/m-p/2885796#M93533</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="291628" data-lia-user-login="Jihwan_Kim" class="lia-mention lia-mention-user"&gt;Jihwan_Kim&lt;/a&gt;&amp;nbsp;, Thanks so much for your solution! It's close but I needed to make a slight change in the dataset. I needed to filter out the data only for February and March to calculate average. Attached is the link with updated file-&lt;/P&gt;&lt;P&gt;&lt;A href="https://drive.google.com/file/d/1vRA6h82VIT7zvvtFczW3eJnr-gxXC-z2/view?usp=share_link" target="_blank"&gt;https://drive.google.com/file/d/1vRA6h82VIT7zvvtFczW3eJnr-gxXC-z2/view?usp=share_link&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Nov 2022 13:36:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Average-while-ignoring-zero-null-values/m-p/2885796#M93533</guid>
      <dc:creator>Green_Cloud</dc:creator>
      <dc:date>2022-11-04T13:36:46Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating Average while ignoring zero/null values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Average-while-ignoring-zero-null-values/m-p/2885946#M93539</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Thank you for your feedback.&lt;/P&gt;
&lt;P&gt;Could you please check the below measure and the attached file, whether it suits your requirement?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Average (February &amp;amp; March) = 
(
    (
        CALCULATE (
            SUM ( [Working Hour] ),
            FILTER ( 'Sample', 'Sample'[Month] = "February" )
        )
    )
        + (
            CALCULATE (
                SUM ( [Working Hour] ),
                FILTER ( 'Sample', 'Sample'[Month] = "March" )
            )
        )
)
    / COUNTROWS (
        FILTER (
            'Sample',
            'Sample'[Month]
                IN { "February", "March" }
                &amp;amp;&amp;amp; 'Sample'[Working Hour] &amp;lt;&amp;gt; 0
        )
    )
&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 04 Nov 2022 14:40:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Average-while-ignoring-zero-null-values/m-p/2885946#M93539</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2022-11-04T14:40:45Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating Average while ignoring zero/null values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Average-while-ignoring-zero-null-values/m-p/2886117#M93548</link>
      <description>&lt;P&gt;edited&lt;/P&gt;</description>
      <pubDate>Fri, 04 Nov 2022 16:42:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Average-while-ignoring-zero-null-values/m-p/2886117#M93548</guid>
      <dc:creator>Green_Cloud</dc:creator>
      <dc:date>2022-11-04T16:42:54Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating Average while ignoring zero/null values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Average-while-ignoring-zero-null-values/m-p/2886168#M93554</link>
      <description>&lt;P&gt;Thanks so much &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="291628" data-lia-user-login="Jihwan_Kim" class="lia-mention lia-mention-user"&gt;Jihwan_Kim&lt;/a&gt;&amp;nbsp;. It worked. I also need to find an average of conversion rate as follows. But the average is not accurate when it comes to the average conversion of of 'David' or 'Maya'. For David, it should be- 108.335 and for Maya-30.555&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is the updated PBI file-&lt;BR /&gt;&lt;A href="https://drive.google.com/file/d/1MPwUn89yxiUYwSWpJKispl7LesBJQd9Y/view?usp=share_link" target="_blank" rel="noopener"&gt;https://drive.google.com/file/d/1MPwUn89yxiUYwSWpJKispl7LesBJQd9Y/view?usp=share_link&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The Dataset-&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Nov 2022 17:30:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Average-while-ignoring-zero-null-values/m-p/2886168#M93554</guid>
      <dc:creator>Green_Cloud</dc:creator>
      <dc:date>2022-11-04T17:30:40Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating Average while ignoring zero/null values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Average-while-ignoring-zero-null-values/m-p/2886801#M93594</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Please check the attached file whether it suits your requirement.&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Sat, 05 Nov 2022 04:50:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Average-while-ignoring-zero-null-values/m-p/2886801#M93594</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2022-11-05T04:50:35Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating Average while ignoring zero/null values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Average-while-ignoring-zero-null-values/m-p/2887366#M93634</link>
      <description>&lt;P&gt;It should ignore the 0% conversion rate for John and Alex. It is considering that.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 06 Nov 2022 05:21:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-Average-while-ignoring-zero-null-values/m-p/2887366#M93634</guid>
      <dc:creator>Green_Cloud</dc:creator>
      <dc:date>2022-11-06T05:21:47Z</dc:date>
    </item>
  </channel>
</rss>

