<?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 multiple columns with some of the column value is not numeric in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-multiple-columns-with-some-of-the-column-value-is-not/m-p/3194874#M115967</link>
    <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I assume that all three columns are of Text type and "-" may appear in any of them, you can try below code to create a calcualted column.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Column = 
var a=IFERROR(VALUE([A]),BLANK())+IFERROR(VALUE([B]),BLANK())+IFERROR(VALUE([C]),BLANK())
var b=ISNUMBER(IFERROR(VALUE([A]),BLANK()))+ISNUMBER(IFERROR(VALUE([B]),BLANK()))++ISNUMBER(IFERROR(VALUE([C]),BLANK()))
return
DIVIDE(a,b)&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Community Support Team _ Jing&lt;BR /&gt;If this post helps, please Accept it as Solution to help other members find it.&lt;/P&gt;</description>
    <pubDate>Wed, 19 Apr 2023 03:34:42 GMT</pubDate>
    <dc:creator>v-jingzhang</dc:creator>
    <dc:date>2023-04-19T03:34:42Z</dc:date>
    <item>
      <title>Average multiple columns with some of the column value is not numeric</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-multiple-columns-with-some-of-the-column-value-is-not/m-p/3187814#M115488</link>
      <description>&lt;P&gt;Hello There&lt;BR /&gt;&lt;BR /&gt;I have several columns in my table, lets say just like this below&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;-&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;I create calculation column after column C with calculate average of column A, B &amp;amp; C.&lt;/P&gt;&lt;P&gt;average of first row is 100%, since the calculation is (1+1+1)/3 which is correct&lt;/P&gt;&lt;P&gt;average of second row is 50% because even second row of column B is blank, by using regular average it will ignore blank cell, so the calculation is (1+blank+1)/2 which also correct&lt;/P&gt;&lt;P&gt;average of third row is error, since value on column B is "-" which is non numerical&lt;/P&gt;&lt;P&gt;i've tried using iferror syntax which convert "-" become 0, but then the calculation become 66.67% because the calculation will be like this (1+0+1)/3, I want the result is 100% because the calculation should be like (1+1)/2, ignoring the "-"&lt;BR /&gt;&lt;BR /&gt;Any help?&lt;/P&gt;&lt;P&gt;thanks a lot&lt;/P&gt;</description>
      <pubDate>Fri, 14 Apr 2023 06:54:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-multiple-columns-with-some-of-the-column-value-is-not/m-p/3187814#M115488</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-04-14T06:54:46Z</dc:date>
    </item>
    <item>
      <title>Re: Average multiple columns with some of the column value is not numeric</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-multiple-columns-with-some-of-the-column-value-is-not/m-p/3187860#M115494</link>
      <description>&lt;P&gt;hi Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Suggest to replace "-" with null in Power Query Editor firstly.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Apr 2023 07:14:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-multiple-columns-with-some-of-the-column-value-is-not/m-p/3187860#M115494</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2023-04-14T07:14:16Z</dc:date>
    </item>
    <item>
      <title>Re: Average multiple columns with some of the column value is not numeric</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-multiple-columns-with-some-of-the-column-value-is-not/m-p/3188630#M115561</link>
      <description>&lt;P&gt;Can't do it, because it's source is live document, each time PBI service is refreshing, that "-" thing is keep re-appear.&lt;/P&gt;&lt;P&gt;"-" mark is required by the owner of data for their routine operation&lt;/P&gt;</description>
      <pubDate>Fri, 14 Apr 2023 13:21:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-multiple-columns-with-some-of-the-column-value-is-not/m-p/3188630#M115561</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-04-14T13:21:17Z</dc:date>
    </item>
    <item>
      <title>Re: Average multiple columns with some of the column value is not numeric</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-multiple-columns-with-some-of-the-column-value-is-not/m-p/3194874#M115967</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I assume that all three columns are of Text type and "-" may appear in any of them, you can try below code to create a calcualted column.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Column = 
var a=IFERROR(VALUE([A]),BLANK())+IFERROR(VALUE([B]),BLANK())+IFERROR(VALUE([C]),BLANK())
var b=ISNUMBER(IFERROR(VALUE([A]),BLANK()))+ISNUMBER(IFERROR(VALUE([B]),BLANK()))++ISNUMBER(IFERROR(VALUE([C]),BLANK()))
return
DIVIDE(a,b)&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Community Support Team _ Jing&lt;BR /&gt;If this post helps, please Accept it as Solution to help other members find it.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Apr 2023 03:34:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-multiple-columns-with-some-of-the-column-value-is-not/m-p/3194874#M115967</guid>
      <dc:creator>v-jingzhang</dc:creator>
      <dc:date>2023-04-19T03:34:42Z</dc:date>
    </item>
    <item>
      <title>Re: Average multiple columns with some of the column value is not numeric</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-multiple-columns-with-some-of-the-column-value-is-not/m-p/3196894#M116094</link>
      <description>&lt;P&gt;Exactly what i need, thank you&lt;/P&gt;</description>
      <pubDate>Thu, 20 Apr 2023 01:36:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-multiple-columns-with-some-of-the-column-value-is-not/m-p/3196894#M116094</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-04-20T01:36:55Z</dc:date>
    </item>
  </channel>
</rss>

