<?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 Sub total in filter in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sub-total-in-filter/m-p/984610#M12072</link>
    <description>&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;I have a count of units for a selected period. I am trying to count only those who have bought an average of 2 units&lt;/P&gt;&lt;P&gt;i.e. total units bought 9 in 3 months so an average of 3.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to count only those customer who have bought an average of 3 units. My DAX works when I bring the customer name. It looks at each customer and calculate the average but when I summarize it, it doesn't work.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to have a count of total customers who have bought an average of 3 units. Instead, I get a count of all customer who have bought even single unit.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would appreciate if someone can assit.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Arif&lt;/P&gt;</description>
    <pubDate>Fri, 20 Mar 2020 20:05:54 GMT</pubDate>
    <dc:creator>arif_ali</dc:creator>
    <dc:date>2020-03-20T20:05:54Z</dc:date>
    <item>
      <title>Sub total in filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sub-total-in-filter/m-p/984610#M12072</link>
      <description>&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;I have a count of units for a selected period. I am trying to count only those who have bought an average of 2 units&lt;/P&gt;&lt;P&gt;i.e. total units bought 9 in 3 months so an average of 3.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to count only those customer who have bought an average of 3 units. My DAX works when I bring the customer name. It looks at each customer and calculate the average but when I summarize it, it doesn't work.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to have a count of total customers who have bought an average of 3 units. Instead, I get a count of all customer who have bought even single unit.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would appreciate if someone can assit.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Arif&lt;/P&gt;</description>
      <pubDate>Fri, 20 Mar 2020 20:05:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sub-total-in-filter/m-p/984610#M12072</guid>
      <dc:creator>arif_ali</dc:creator>
      <dc:date>2020-03-20T20:05:54Z</dc:date>
    </item>
    <item>
      <title>Re: Sub total in filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sub-total-in-filter/m-p/984638#M12075</link>
      <description>&lt;LI-CODE lang="markup"&gt;// Measures should be defined in advance:
// [Total Units]
// [Total Months]

[Monthly Average] =
	DIVIDE(
		[Total Units],
		[Total Months]
	)
	
[# Cust with avg of 3 units] =
	SUMX(
		Customers,
		1 * ( [Monthly Avg] = 3 )
	)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best&lt;/P&gt;
&lt;P&gt;D&lt;/P&gt;</description>
      <pubDate>Fri, 20 Mar 2020 20:39:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sub-total-in-filter/m-p/984638#M12075</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-03-20T20:39:33Z</dc:date>
    </item>
    <item>
      <title>Re: Sub total in filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sub-total-in-filter/m-p/984665#M12077</link>
      <description>&lt;P&gt;Hello D,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for the prompt response!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It partially worked (I should have been more specific). If customer's average is 3 for all 3 months, I get a count of 3 whereas I want to count unique customers.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Arif&lt;/P&gt;</description>
      <pubDate>Fri, 20 Mar 2020 21:35:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sub-total-in-filter/m-p/984665#M12077</guid>
      <dc:creator>arif_ali</dc:creator>
      <dc:date>2020-03-20T21:35:55Z</dc:date>
    </item>
    <item>
      <title>Re: Sub total in filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sub-total-in-filter/m-p/984683#M12081</link>
      <description>Sorry but I don't follow.&lt;BR /&gt;&lt;BR /&gt;Best&lt;BR /&gt;D</description>
      <pubDate>Fri, 20 Mar 2020 22:13:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sub-total-in-filter/m-p/984683#M12081</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-03-20T22:13:08Z</dc:date>
    </item>
    <item>
      <title>Re: Sub total in filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sub-total-in-filter/m-p/984696#M12082</link>
      <description>&lt;P&gt;Hi D,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Active Customers = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR mStartDate = MIN('Business Dates'[Date])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR mEndDate = LASTDATE('Business Dates'[Date])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR mMonths = DATEDIFF(mStartDate,mEndDate,MONTH)+1&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR mProducts = IF(ISBLANK([Products CY]),0,[Products CY])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR mAverage = DIVIDE(mProducts,mMonths)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;RETURN&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;SUMX('Calc Active Dealers',1*(mAverage&amp;gt;=2))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;The results is 689 whereas I only a total of 350 customers. It is counting each customer for each month as opposed to one time for the period selected).&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Thank you,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 20 Mar 2020 22:35:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sub-total-in-filter/m-p/984696#M12082</guid>
      <dc:creator>arif_ali</dc:creator>
      <dc:date>2020-03-20T22:35:09Z</dc:date>
    </item>
    <item>
      <title>Re: Sub total in filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sub-total-in-filter/m-p/984703#M12084</link>
      <description>&lt;LI-CODE lang="markup"&gt;// Dealers must be a dimension connected
// to the fact table on DealerId.

Active Dealers =
VAR mStartDate = MIN( 'Business Dates'[Date] )
VAR mEndDate = MAX( 'Business Dates'[Date] )
VAR mMonths =
	DATEDIFF( mStartDate, mEndDate, MONTH) + 1
var __dealers =
	SUMX(
		Dealers,
		1 * ( [Products CY] &amp;gt;= 2 * mMonths )
	)
RETURN
	__dealers&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best&lt;/P&gt;
&lt;P&gt;D&lt;/P&gt;</description>
      <pubDate>Fri, 20 Mar 2020 22:53:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sub-total-in-filter/m-p/984703#M12084</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-03-20T22:53:15Z</dc:date>
    </item>
    <item>
      <title>Re: Sub total in filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sub-total-in-filter/m-p/984718#M12086</link>
      <description>&lt;P&gt;Hi D,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You are lifesaver. It worked!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much&lt;/P&gt;</description>
      <pubDate>Fri, 20 Mar 2020 23:27:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sub-total-in-filter/m-p/984718#M12086</guid>
      <dc:creator>arif_ali</dc:creator>
      <dc:date>2020-03-20T23:27:49Z</dc:date>
    </item>
    <item>
      <title>Re: Sub total in filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sub-total-in-filter/m-p/984720#M12088</link>
      <description>Glad it's worked for you. Would you mind giving me a kudo, please?&lt;BR /&gt;&lt;BR /&gt;Best&lt;BR /&gt;D</description>
      <pubDate>Fri, 20 Mar 2020 23:35:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sub-total-in-filter/m-p/984720#M12088</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-03-20T23:35:04Z</dc:date>
    </item>
    <item>
      <title>Re: Sub total in filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sub-total-in-filter/m-p/984781#M12097</link>
      <description>Hi D,&lt;BR /&gt;&lt;BR /&gt;I am new to any community. I will certainly do it because you deserve it. Can you please tell me how to do it?&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Arif</description>
      <pubDate>Sat, 21 Mar 2020 02:00:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sub-total-in-filter/m-p/984781#M12097</guid>
      <dc:creator>arif_ali</dc:creator>
      <dc:date>2020-03-21T02:00:46Z</dc:date>
    </item>
  </channel>
</rss>

