<?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: How to calculate Average for non-numeric fields in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-Average-for-non-numeric-fields/m-p/786469#M4343</link>
    <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. You need a 1-to-many relationship between the Quarter table (shown right) and the data table (shown left) thru Project name&lt;/P&gt;
&lt;P&gt;2. Place QuarterTable[Quarter] in the rows of a matrix visual&lt;/P&gt;
&lt;P&gt;3. Place this measure in the visual:&lt;/P&gt;
&lt;PRE&gt;Measure =
DIVIDE (
    CALCULATE ( COUNTROWS ( Table1 ), Table1[issue type] = "Bug" ),
    DISTINCTCOUNT( Table1[Project Name] )
)
&lt;/PRE&gt;
&lt;P&gt;&lt;STRONG&gt;Please mark the question solved when we get to the solution and consider kudoing if posts are helpful.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Cheers&amp;nbsp;&amp;nbsp;&lt;IMG src="https://community.fabric.microsoft.com/html/badge_icons/SU18_powerbi_badge.png" border="0" alt="Datanaut" width="64" height="64" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 08 Sep 2019 17:30:07 GMT</pubDate>
    <dc:creator>AlB</dc:creator>
    <dc:date>2019-09-08T17:30:07Z</dc:date>
    <item>
      <title>How to calculate Average for non-numeric fields</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-Average-for-non-numeric-fields/m-p/786457#M4339</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I have 1 year Jira data which has all the Bugs, Builds, Tasks (Issue_type) for each Project. Now i need to calculate the Average number of bugs for project in Quarter 1, Quarter 2, Quarter 3 Quarter 4.&amp;nbsp; , How to calculate the average. I need to do something like, for all the project in Quarter 1 Calculate how many Issue_Type = bug for each project and then divide by number of Projects in that Quarter. This will give me average number of bugs in each quarter.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;img /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 08 Sep 2019 15:27:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-Average-for-non-numeric-fields/m-p/786457#M4339</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-09-08T15:27:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate Average for non-numeric fields</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-Average-for-non-numeric-fields/m-p/786469#M4343</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. You need a 1-to-many relationship between the Quarter table (shown right) and the data table (shown left) thru Project name&lt;/P&gt;
&lt;P&gt;2. Place QuarterTable[Quarter] in the rows of a matrix visual&lt;/P&gt;
&lt;P&gt;3. Place this measure in the visual:&lt;/P&gt;
&lt;PRE&gt;Measure =
DIVIDE (
    CALCULATE ( COUNTROWS ( Table1 ), Table1[issue type] = "Bug" ),
    DISTINCTCOUNT( Table1[Project Name] )
)
&lt;/PRE&gt;
&lt;P&gt;&lt;STRONG&gt;Please mark the question solved when we get to the solution and consider kudoing if posts are helpful.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Cheers&amp;nbsp;&amp;nbsp;&lt;IMG src="https://community.fabric.microsoft.com/html/badge_icons/SU18_powerbi_badge.png" border="0" alt="Datanaut" width="64" height="64" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 08 Sep 2019 17:30:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-Average-for-non-numeric-fields/m-p/786469#M4343</guid>
      <dc:creator>AlB</dc:creator>
      <dc:date>2019-09-08T17:30:07Z</dc:date>
    </item>
  </channel>
</rss>

