<?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: Ignore average if not available in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ignore-average-if-not-available/m-p/1705579#M35151</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="281771" data-lia-user-login="rfigtree" class="lia-mention lia-mention-user"&gt;rfigtree&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes you are correct. To fix that we've to create virtual table like below&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 05 Mar 2021 12:18:33 GMT</pubDate>
    <dc:creator>gvrajesh</dc:creator>
    <dc:date>2021-03-05T12:18:33Z</dc:date>
    <item>
      <title>Ignore average if not available</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ignore-average-if-not-available/m-p/1705266#M35145</link>
      <description>&lt;P&gt;Hi Guys,&lt;BR /&gt;&lt;BR /&gt;I wan't to ignore an average which is calculated in a certain metric when there is no data available for a certain year for another metric. I have this matrix:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Year&lt;/TD&gt;&lt;TD&gt;Avg1&lt;/TD&gt;&lt;TD&gt;Avg2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2017&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;15&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2018&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;TD&gt;12&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2019&lt;/TD&gt;&lt;TD&gt;14&lt;/TD&gt;&lt;TD&gt;19&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2020&lt;/TD&gt;&lt;TD&gt;12&lt;/TD&gt;&lt;TD&gt;12&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;total&lt;/TD&gt;&lt;TD&gt;12&lt;/TD&gt;&lt;TD&gt;14.5&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For my report, I'm calculating and presenting the overall difference between avg1 and avg2. What I wan't is when no data available for a certain year for avg1, don't calculate the average for avg2 (I'm not presenting the matrix, but only the overall). 15 is now influencing the overall comparison which is wrong.&amp;nbsp; How to solve this?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;The measures I'm using the calculate the averages are pretty basic: sum(sales) / distinctcount(orderid)&lt;/P&gt;</description>
      <pubDate>Fri, 05 Mar 2021 10:20:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ignore-average-if-not-available/m-p/1705266#M35145</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-03-05T10:20:49Z</dc:date>
    </item>
    <item>
      <title>Re: Ignore average if not available</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ignore-average-if-not-available/m-p/1705359#M35148</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can calculate Avg2 only when Avg1 is not blank using below logic&lt;/P&gt;&lt;P&gt;Avg2 = IF( ISBLANK(AVG1), BLANK(),sum(sales) / distinctcount(orderid))&lt;/P&gt;</description>
      <pubDate>Fri, 05 Mar 2021 11:11:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ignore-average-if-not-available/m-p/1705359#M35148</guid>
      <dc:creator>gvrajesh</dc:creator>
      <dc:date>2021-03-05T11:11:25Z</dc:date>
    </item>
    <item>
      <title>Re: Ignore average if not available</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ignore-average-if-not-available/m-p/1705371#M35149</link>
      <description>&lt;P&gt;i was thinking the same, but not too sure it will work when it calculates at the total level. as when the year context is removed [avg1] wont be blank so 2017 will be included? just thinking I could be wrong.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Mar 2021 11:18:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ignore-average-if-not-available/m-p/1705371#M35149</guid>
      <dc:creator>rfigtree</dc:creator>
      <dc:date>2021-03-05T11:18:41Z</dc:date>
    </item>
    <item>
      <title>Re: Ignore average if not available</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ignore-average-if-not-available/m-p/1705579#M35151</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="281771" data-lia-user-login="rfigtree" class="lia-mention lia-mention-user"&gt;rfigtree&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes you are correct. To fix that we've to create virtual table like below&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Mar 2021 12:18:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ignore-average-if-not-available/m-p/1705579#M35151</guid>
      <dc:creator>gvrajesh</dc:creator>
      <dc:date>2021-03-05T12:18:33Z</dc:date>
    </item>
    <item>
      <title>Re: Ignore average if not available</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ignore-average-if-not-available/m-p/1705589#M35153</link>
      <description>&lt;P&gt;cool, it is fun seeing peoples solutions on here. always learning something new.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Mar 2021 12:24:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Ignore-average-if-not-available/m-p/1705589#M35153</guid>
      <dc:creator>rfigtree</dc:creator>
      <dc:date>2021-03-05T12:24:12Z</dc:date>
    </item>
  </channel>
</rss>

