<?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: Matrix Countrows in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Matrix-Countrows/m-p/3221976#M117783</link>
    <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;Please Share your Expected Output.&lt;/P&gt;</description>
    <pubDate>Fri, 05 May 2023 11:46:08 GMT</pubDate>
    <dc:creator>Mahesh0016</dc:creator>
    <dc:date>2023-05-05T11:46:08Z</dc:date>
    <item>
      <title>Matrix Countrows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Matrix-Countrows/m-p/3221440#M117746</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am stuck with a measure creation and would really appreciate some help!&lt;BR /&gt;&lt;BR /&gt;I have a tabular model with a lot of measures and need to create another one working with existing ones.&lt;/P&gt;&lt;P&gt;This is related to timesheets.&lt;/P&gt;&lt;P&gt;I have a measure [Total Hours] - hours logged by employee&lt;/P&gt;&lt;P&gt;measure [Standard Hours] - hours expected for the employee.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The new measure needs to check if total hours&amp;lt;standard hours * .75 and flag 1 if true. And count the true total.&lt;/P&gt;&lt;P&gt;I created a measure that works in a table, but when I use in a matrix with other rows the total is not counting correctly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've tested many ways and this is what I have at the moment(i just added the if because i just received a requirement to also return 1 if total hours =0):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;var filter1 = COUNTROWS(FILTER (&lt;BR /&gt;'Staff Detail',&lt;BR /&gt;('Staff Detail'[Left Date] &amp;gt; TODAY() - 7 || ISBLANK('Staff Detail'[Left Date])) // check if employee is still valid for this week timesheet&lt;BR /&gt;&amp;amp;&amp;amp; [Total Hours]&amp;lt;Measures_[Standard Hours]*.75 ))&lt;/P&gt;&lt;P&gt;return&lt;/P&gt;&lt;P&gt;if([Total Hours]=0,1,filter1)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;The matrix has 4 rows( service line- office - name - client name - description&lt;/P&gt;&lt;P&gt;the flag is working fine, just need to count the totals. I tried countx to change context but didn't work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Fri, 05 May 2023 06:44:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Matrix-Countrows/m-p/3221440#M117746</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-05-05T06:44:31Z</dc:date>
    </item>
    <item>
      <title>Re: Matrix Countrows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Matrix-Countrows/m-p/3221976#M117783</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;Please Share your Expected Output.&lt;/P&gt;</description>
      <pubDate>Fri, 05 May 2023 11:46:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Matrix-Countrows/m-p/3221976#M117783</guid>
      <dc:creator>Mahesh0016</dc:creator>
      <dc:date>2023-05-05T11:46:08Z</dc:date>
    </item>
    <item>
      <title>Re: Matrix Countrows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Matrix-Countrows/m-p/3222339#M117823</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="478098" data-lia-user-login="Mahesh0016" class="lia-mention lia-mention-user"&gt;Mahesh0016&lt;/a&gt;, I'd like to see the count for the total rows flagged with 1 on the matrix total.&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;</description>
      <pubDate>Fri, 05 May 2023 14:23:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Matrix-Countrows/m-p/3222339#M117823</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-05-05T14:23:26Z</dc:date>
    </item>
  </channel>
</rss>

