<?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: Count rows of the values of a measure in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-rows-of-the-values-of-a-measure/m-p/4383051#M173973</link>
    <description>&lt;P&gt;Not working, need distinc counts&lt;/P&gt;</description>
    <pubDate>Mon, 27 Jan 2025 18:43:33 GMT</pubDate>
    <dc:creator>Leyli_ON</dc:creator>
    <dc:date>2025-01-27T18:43:33Z</dc:date>
    <item>
      <title>Count rows of the values of a measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-rows-of-the-values-of-a-measure/m-p/4380317#M173880</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried looking at various posts here to see if someone had similiar ask, but coudnt find one that really fits, but if its something i missed please refer me to the post happy to review it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Herewith my query: I have created a Measure as follows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;OffMarc_Cost = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;SUM&lt;/SPAN&gt;&lt;SPAN&gt;('Hana Order Acutal Cost'[Cost]),'Hana Order Acutal Cost'[Cost Element] &amp;lt;&amp;gt; &lt;/SPAN&gt;&lt;SPAN&gt;"0000555090"&lt;/SPAN&gt;&lt;SPAN&gt;,'Hana Equipment Additional Data'[Equipment F/L] = &lt;/SPAN&gt;&lt;SPAN&gt;"1200-MO-0215-M020-001"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;OnMarc_Cost =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;SUM&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Hana Order Acutal Cost'&lt;/SPAN&gt;&lt;SPAN&gt;[Cost]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;'Hana Order Acutal Cost'&lt;/SPAN&gt;&lt;SPAN&gt;[Cost Element]&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;"0000555090"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;'Hana Equipment Additional Data'&lt;/SPAN&gt;&lt;SPAN&gt;[Equipment F/L]&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;"1200-MO-0215-M020-001"&lt;/SPAN&gt;&lt;SPAN&gt;) &amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;This sum all the cost of a specific piece of equipment that falls into these specific filter.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I want to be able to create a rowcount from the result of these measure as per below example. How will i create this in a measure, as i will use these totals for a month then in a calculation.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 24 Jan 2025 19:45:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-rows-of-the-values-of-a-measure/m-p/4380317#M173880</guid>
      <dc:creator>Leyli_ON</dc:creator>
      <dc:date>2025-01-24T19:45:21Z</dc:date>
    </item>
    <item>
      <title>Re: Count rows of the values of a measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-rows-of-the-values-of-a-measure/m-p/4380337#M173881</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="895719" data-lia-user-login="Leyli_ON" class="lia-mention lia-mention-user"&gt;Leyli_ON&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;You can try this way:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Count_OffMarc_Rows =
COUNTROWS(
    FILTER(
        'Hana Order Acutal Cost',
        'Hana Order Acutal Cost'[Cost Element] &amp;lt;&amp;gt; "0000555090"
            &amp;amp;&amp;amp; RELATED('Hana Equipment Additional Data'[Equipment F/L]) = "1200-MO-0215-M020-001"
    )
)
&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 24 Jan 2025 19:59:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-rows-of-the-values-of-a-measure/m-p/4380337#M173881</guid>
      <dc:creator>Fowmy</dc:creator>
      <dc:date>2025-01-24T19:59:31Z</dc:date>
    </item>
    <item>
      <title>Re: Count rows of the values of a measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-rows-of-the-values-of-a-measure/m-p/4382523#M173959</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="52518" data-lia-user-login="Fowmy" class="lia-mention lia-mention-user"&gt;Fowmy&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your response, however this I have tried but it seems to count all the entries for this, and i need the unique count for the equipment.&amp;nbsp; So i have a measure to do unique count on the equipment as that is a link to another table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Count_OffMarc_Rows =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;COUNTROWS&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;SUMMARIZE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Hana Equipment Additional Data'&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;'Hana Equipment Additional Data'&lt;/SPAN&gt;&lt;SPAN&gt;[Equipment Desc]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;As your measure do a count of each row based on those filter which is correct, but i need the distinc count... As that total should then be 15 for May&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jan 2025 13:31:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-rows-of-the-values-of-a-measure/m-p/4382523#M173959</guid>
      <dc:creator>Leyli_ON</dc:creator>
      <dc:date>2025-01-27T13:31:10Z</dc:date>
    </item>
    <item>
      <title>Re: Count rows of the values of a measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-rows-of-the-values-of-a-measure/m-p/4383051#M173973</link>
      <description>&lt;P&gt;Not working, need distinc counts&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jan 2025 18:43:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-rows-of-the-values-of-a-measure/m-p/4383051#M173973</guid>
      <dc:creator>Leyli_ON</dc:creator>
      <dc:date>2025-01-27T18:43:33Z</dc:date>
    </item>
    <item>
      <title>Re: Count rows of the values of a measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-rows-of-the-values-of-a-measure/m-p/4383146#M173983</link>
      <description>&lt;P&gt;Ok, i tweeked it a bit, since&amp;nbsp; I was working with 2 tables. 1 table was Equipment which i used to display the equipment related to my Cost which was in the HanaOrderActualCost Table. So i just brought the equipment column into my HanaOrderACtualCost table since it was related and modified the measure as follows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;OffMarcCount = &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;DISTINCTCOUNT&lt;/SPAN&gt;&lt;SPAN&gt;('Hana Order Acutal Cost'[Equipment]),&lt;/SPAN&gt;&lt;SPAN&gt;FILTER&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'Hana Order Acutal Cost',&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'Hana Order Acutal Cost'[Cost Element] &amp;lt;&amp;gt; &lt;/SPAN&gt;&lt;SPAN&gt;"0000555090"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;amp;&amp;amp; &lt;/SPAN&gt;&lt;SPAN&gt;RELATED&lt;/SPAN&gt;&lt;SPAN&gt;('Hana Equipment Additional Data'[Equipment F/L]) = &lt;/SPAN&gt;&lt;SPAN&gt;"1200-MO-0215-M020-001"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Would still like to know if it is possible to write a dax measure without bringing in the equipment in my ordertable to achieve the same&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 27 Jan 2025 20:16:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-rows-of-the-values-of-a-measure/m-p/4383146#M173983</guid>
      <dc:creator>Leyli_ON</dc:creator>
      <dc:date>2025-01-27T20:16:28Z</dc:date>
    </item>
  </channel>
</rss>

