<?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: I want to count and reflect the number of reason codes against each row in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-want-to-count-and-reflect-the-number-of-reason-codes-against/m-p/756096#M3009</link>
    <description>&lt;P&gt;This is working. Thanks dude.&lt;/P&gt;</description>
    <pubDate>Fri, 02 Aug 2019 07:46:28 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-08-02T07:46:28Z</dc:date>
    <item>
      <title>I want to count and reflect the number of reason codes against each row</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-want-to-count-and-reflect-the-number-of-reason-codes-against/m-p/755113#M2956</link>
      <description>&lt;P&gt;Below is the table and &lt;STRONG&gt;count of Reason code&lt;/STRONG&gt; is the result I am trying to get in power BI. In first coloumn same Document number is there and against each document either there is reason code present or not present . I want to count and reflect the number of reason codes against each row .&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For eg. 123 document has total of 3 reason codes. so 3 count will reflect against each 123 row.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;my excel formula to claculate count of reason code is :&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;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gt;&lt;TR&gt;&lt;TD&gt;231&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried below DAX formula but it is giving me the total of all reason codes. But I want sum of Reason code come against each document =&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;call = CALCULATE(COUNTAX(Sheet1,Sheet1[Order Number]),FILTER(Sheet1,Sheet1[reasoncode1]&amp;gt;0))&lt;/STRONG&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Aug 2019 11:28:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-want-to-count-and-reflect-the-number-of-reason-codes-against/m-p/755113#M2956</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-08-01T11:28:03Z</dc:date>
    </item>
    <item>
      <title>Re: I want to count and reflect the number of reason codes against each row</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-want-to-count-and-reflect-the-number-of-reason-codes-against/m-p/755138#M2958</link>
      <description>&lt;P&gt;Hi Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try following&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;=
CALCULATE ( SUM ( Sheet1[reasoncode] ), ALLEXCEPT ( sheet1, sheet1[Docs] ) )
&lt;/PRE&gt;</description>
      <pubDate>Thu, 01 Aug 2019 12:06:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-want-to-count-and-reflect-the-number-of-reason-codes-against/m-p/755138#M2958</guid>
      <dc:creator>Zubair_Muhammad</dc:creator>
      <dc:date>2019-08-01T12:06:46Z</dc:date>
    </item>
    <item>
      <title>Re: I want to count and reflect the number of reason codes against each row</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-want-to-count-and-reflect-the-number-of-reason-codes-against/m-p/755145#M2959</link>
      <description>&lt;P&gt;You could try this as well:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;[Count of Reason Codes] =
var __oneDocVisibleAndDirectltyFiltered = HASONEFILTER( T[Docs] )
var __reasonCodeCount =
	CALCULATE(
		SUM ( T[Reason Code (T/N)] ),
		VALUES( T[Docs] ),
		ALL( T )
	)
return
	if(
		__oneDocVisibleAndDirectlyFiltered,
		__reasonCodeCount
	)&lt;/PRE&gt;&lt;P&gt;Best&lt;/P&gt;&lt;P&gt;Darek&lt;/P&gt;</description>
      <pubDate>Thu, 01 Aug 2019 12:15:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-want-to-count-and-reflect-the-number-of-reason-codes-against/m-p/755145#M2959</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-08-01T12:15:19Z</dc:date>
    </item>
    <item>
      <title>Re: I want to count and reflect the number of reason codes against each row</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-want-to-count-and-reflect-the-number-of-reason-codes-against/m-p/756096#M3009</link>
      <description>&lt;P&gt;This is working. Thanks dude.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Aug 2019 07:46:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-want-to-count-and-reflect-the-number-of-reason-codes-against/m-p/756096#M3009</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-08-02T07:46:28Z</dc:date>
    </item>
  </channel>
</rss>

