<?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: YOY % Growth by Distinct Customer ID in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/YOY-Growth-by-Distinct-Customer-ID/m-p/2759235#M85469</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="439915" data-lia-user-login="DataScope06" class="lia-mention lia-mention-user"&gt;DataScope06&lt;/a&gt; , Use a separate date table. Prefer to use a separate category table too Both should be joined with your table &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;YTD Sales = CALCULATE(count(Table[CustomerID]),DATESYTD('Date'[Date],"12/31"))&lt;BR /&gt;Last YTD Sales = CALCULATE(count(Table[CustomerID]),DATESYTD(dateadd('Date'[Date],-1,Year),"12/31"))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;or&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This year Sales = CALCULATE(count(Table[CustomerID]),DATESYTD(ENDOFYEAR('Date'[Date]),"12/31"))&lt;BR /&gt;Last year Sales = CALCULATE(count(Table[CustomerID]),DATESYTD(ENDOFYEAR(dateadd('Date'[Date],-1,Year)),"12/31"))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;then&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;diff = [This Year]-[Last Year ]&lt;BR /&gt;diff % = divide([This Year]-[Last Year ],[Last Year ])&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Power BI — Year on Year with or Without Time Intelligence &lt;BR /&gt;&lt;A href="https://medium.com/@amitchandak.1978/power-bi-ytd-questions-time-intelligence-1-5-e3174b39f38a" target="_blank"&gt;https://medium.com/@amitchandak.1978/power-bi-ytd-questions-time-intelligence-1-5-e3174b39f38a&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://www.youtube.com/watch?v=km41KfM_0uA" target="_blank"&gt;https://www.youtube.com/watch?v=km41KfM_0uA&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Why Time Intelligence Fails - Powerbi 5 Savior Steps for TI :&lt;A href="https://youtu.be/OBf0rjpp5Hw" target="_blank"&gt;https://youtu.be/OBf0rjpp5Hw&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://amitchandak.medium.com/power-bi-5-key-points-to-make-time-intelligence-successful-bd52912a5bd4" target="_blank"&gt;https://amitchandak.medium.com/power-bi-5-key-points-to-make-time-intelligence-successful-bd52912a5bd4&lt;/A&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :&lt;A href="https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions" target="_blank"&gt;radacad&lt;/A&gt; &lt;A href="https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/" target="_blank"&gt;sqlbi&lt;/A&gt; &lt;A href="https://www.youtube.com/playlist?list=PLPaNVDMhUXGYLz-w8ERQOo3KYARs7GgG-" target="_blank"&gt;My Video Series&lt;/A&gt; Appreciate your Kudos. &lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 10 Sep 2022 02:19:01 GMT</pubDate>
    <dc:creator>amitchandak</dc:creator>
    <dc:date>2022-09-10T02:19:01Z</dc:date>
    <item>
      <title>YOY % Growth by Distinct Customer ID</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/YOY-Growth-by-Distinct-Customer-ID/m-p/2759163#M85459</link>
      <description>&lt;P&gt;I have a table with customer IDs by date. Each customer falls in a different category. The data looks like this:&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;customerID&lt;/TD&gt;&lt;TD&gt;category&lt;/TD&gt;&lt;TD&gt;created_at&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;Red&lt;/TD&gt;&lt;TD&gt;1/1/2021&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;Red&lt;/TD&gt;&lt;TD&gt;5/1/2021&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;Blue&lt;/TD&gt;&lt;TD&gt;6/1/2021&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;Red&lt;/TD&gt;&lt;TD&gt;1/1/2022&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;Red&lt;/TD&gt;&lt;TD&gt;4/1/2022&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;TD&gt;Red&lt;/TD&gt;&lt;TD&gt;5/1/2022&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;7&lt;/TD&gt;&lt;TD&gt;Red&lt;/TD&gt;&lt;TD&gt;6/1/2022&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;8&lt;/TD&gt;&lt;TD&gt;Blue&lt;/TD&gt;&lt;TD&gt;7/1/2022&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;9&lt;/TD&gt;&lt;TD&gt;Blue&lt;/TD&gt;&lt;TD&gt;8/1/2022&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;TD&gt;Blue&lt;/TD&gt;&lt;TD&gt;8/1/2022&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using the customerID to count customers, I need to show the YOY growth in the Red and Blue categories.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is a classic problem for this calculation:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Year-over-Year Growth&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;= (Current count – Previous year count) X 100 / Previous year count).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using the above example data, from 2021 to 2022, customer growth increased 100% in the Red category and 200% in the Blue category.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When trying to use Dax functions I get a duplicate date error. Or when I try to incorporate distinct count into the sum, the previous year shows a value of one, which I assume means the formula is just counting the previous year's value as one distinct number.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2022 23:08:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/YOY-Growth-by-Distinct-Customer-ID/m-p/2759163#M85459</guid>
      <dc:creator>DataScope06</dc:creator>
      <dc:date>2022-09-09T23:08:45Z</dc:date>
    </item>
    <item>
      <title>Re: YOY % Growth by Distinct Customer ID</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/YOY-Growth-by-Distinct-Customer-ID/m-p/2759235#M85469</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="439915" data-lia-user-login="DataScope06" class="lia-mention lia-mention-user"&gt;DataScope06&lt;/a&gt; , Use a separate date table. Prefer to use a separate category table too Both should be joined with your table &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;YTD Sales = CALCULATE(count(Table[CustomerID]),DATESYTD('Date'[Date],"12/31"))&lt;BR /&gt;Last YTD Sales = CALCULATE(count(Table[CustomerID]),DATESYTD(dateadd('Date'[Date],-1,Year),"12/31"))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;or&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This year Sales = CALCULATE(count(Table[CustomerID]),DATESYTD(ENDOFYEAR('Date'[Date]),"12/31"))&lt;BR /&gt;Last year Sales = CALCULATE(count(Table[CustomerID]),DATESYTD(ENDOFYEAR(dateadd('Date'[Date],-1,Year)),"12/31"))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;then&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;diff = [This Year]-[Last Year ]&lt;BR /&gt;diff % = divide([This Year]-[Last Year ],[Last Year ])&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Power BI — Year on Year with or Without Time Intelligence &lt;BR /&gt;&lt;A href="https://medium.com/@amitchandak.1978/power-bi-ytd-questions-time-intelligence-1-5-e3174b39f38a" target="_blank"&gt;https://medium.com/@amitchandak.1978/power-bi-ytd-questions-time-intelligence-1-5-e3174b39f38a&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://www.youtube.com/watch?v=km41KfM_0uA" target="_blank"&gt;https://www.youtube.com/watch?v=km41KfM_0uA&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Why Time Intelligence Fails - Powerbi 5 Savior Steps for TI :&lt;A href="https://youtu.be/OBf0rjpp5Hw" target="_blank"&gt;https://youtu.be/OBf0rjpp5Hw&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://amitchandak.medium.com/power-bi-5-key-points-to-make-time-intelligence-successful-bd52912a5bd4" target="_blank"&gt;https://amitchandak.medium.com/power-bi-5-key-points-to-make-time-intelligence-successful-bd52912a5bd4&lt;/A&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :&lt;A href="https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions" target="_blank"&gt;radacad&lt;/A&gt; &lt;A href="https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/" target="_blank"&gt;sqlbi&lt;/A&gt; &lt;A href="https://www.youtube.com/playlist?list=PLPaNVDMhUXGYLz-w8ERQOo3KYARs7GgG-" target="_blank"&gt;My Video Series&lt;/A&gt; Appreciate your Kudos. &lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Sep 2022 02:19:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/YOY-Growth-by-Distinct-Customer-ID/m-p/2759235#M85469</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2022-09-10T02:19:01Z</dc:date>
    </item>
    <item>
      <title>Re: YOY % Growth by Distinct Customer ID</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/YOY-Growth-by-Distinct-Customer-ID/m-p/2762520#M85669</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="148838" data-lia-user-login="amitchandak" class="lia-mention lia-mention-user"&gt;amitchandak&lt;/a&gt;&amp;nbsp;When I use the calculation you provided, the count for customers is 1. But the value should be in the hundreds of thousands.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, the created_at field does not appear to join the date table properly. In my dataset, created_at is a datetime field that goes back to 2017. But only dates in 2022 appear to be joining together.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;</description>
      <pubDate>Mon, 12 Sep 2022 16:58:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/YOY-Growth-by-Distinct-Customer-ID/m-p/2762520#M85669</guid>
      <dc:creator>DataScope06</dc:creator>
      <dc:date>2022-09-12T16:58:30Z</dc:date>
    </item>
    <item>
      <title>Re: YOY % Growth by Distinct Customer ID</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/YOY-Growth-by-Distinct-Customer-ID/m-p/2763596#M85734</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="439915" data-lia-user-login="DataScope06" class="lia-mention lia-mention-user"&gt;DataScope06&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please try this measure:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Year-over-Year Growth = 
VAR _year =
    MAX ( 'Calendar'[Year] )
VAR _category =
    MAX ( 'Table'[category] )
VAR _current_count =
    CALCULATE (
        COUNT ( 'Table'[customerID] ),
        'Calendar'[Year] = _year,
        'Table'[category] = _category
    )
VAR _previous_year_count =
    CALCULATE (
        COUNT ( 'Table'[customerID] ),
        'Calendar'[Year] = _year - 1,
        'Table'[category] = _category
    ) + 0
VAR _growth =
    DIVIDE ( _current_count - _previous_year_count, _previous_year_count )
RETURN
    _growth&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;Best Regards,&lt;BR /&gt;Gao&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;Community Support Team&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;If there is any post&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;FONT size="3" color="#FF0000" data-darkreader-inline-color=""&gt;&lt;EM&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;&lt;/EM&gt;&lt;/FONT&gt;, then please consider&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;FONT size="3"&gt;&lt;FONT color="#FF0000" data-darkreader-inline-color=""&gt;&lt;EM&gt;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know.&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;FONT size="3"&gt;Thanks a lot!&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2" color="#FF0000" data-darkreader-inline-color=""&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;How to get your questions answered quickly&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;--&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;How to provide sample data&lt;/SPAN&gt;&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Sep 2022 07:47:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/YOY-Growth-by-Distinct-Customer-ID/m-p/2763596#M85734</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-09-13T07:47:29Z</dc:date>
    </item>
    <item>
      <title>Re: YOY % Growth by Distinct Customer ID</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/YOY-Growth-by-Distinct-Customer-ID/m-p/2765111#M85863</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Thank you,&amp;nbsp;Anonymous&lt;/a&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;Your solution works to return the percent difference between current and previous year. How would this calculation be adjusted to show the percent difference in running totals?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;For example, in 2020 there are 10 new customers, then in 2021, 15 new customers and in 2022 10 new customers.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;So the running sum of all customers are 10 in 2020, 25 customers in 2021, and 45 customers in 2022.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;In that situation the growth rates would be:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;2021: (25-10)/10 = 150%&lt;BR /&gt;2020: (45-25)/25 = 80%&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Sep 2022 18:11:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/YOY-Growth-by-Distinct-Customer-ID/m-p/2765111#M85863</guid>
      <dc:creator>DataScope06</dc:creator>
      <dc:date>2022-09-13T18:11:54Z</dc:date>
    </item>
    <item>
      <title>Re: YOY % Growth by Distinct Customer ID</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/YOY-Growth-by-Distinct-Customer-ID/m-p/2765671#M85885</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="439915" data-lia-user-login="DataScope06" class="lia-mention lia-mention-user"&gt;DataScope06&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please try:&lt;/P&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="100%"&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;EM&gt;Year-over-Year Growth = &lt;/EM&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;EM&gt;VAR _year =&lt;/EM&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; MAX ( 'Calendar'[Year] )&lt;/EM&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;EM&gt;VAR _category =&lt;/EM&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; MAX ( 'Table'[category] )&lt;/EM&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;EM&gt;VAR _current_count =&lt;/EM&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; CALCULATE (&lt;/EM&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; COUNT ( 'Table'[customerID] ),&lt;/EM&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; '&lt;STRONG&gt;Calendar'[Year] &amp;lt;= _year,&lt;/STRONG&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'Table'[category] = _category&lt;/EM&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; )&lt;/EM&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;EM&gt;VAR _previous_year_count =&lt;/EM&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; CALCULATE (&lt;/EM&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; COUNT ( 'Table'[customerID] ),&lt;/EM&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'Calendar'[Year] = _year - 1,&lt;/EM&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'Table'[category] = _category&lt;/EM&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; ) + 0&lt;/EM&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;EM&gt;VAR _growth =&lt;/EM&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; DIVIDE ( _current_count - _previous_year_count, _previous_year_count )&lt;/EM&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;EM&gt;RETURN&lt;/EM&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; _growth&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;Best Regards,&lt;BR /&gt;Gao&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;Community Support Team&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Sep 2022 01:37:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/YOY-Growth-by-Distinct-Customer-ID/m-p/2765671#M85885</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-09-14T01:37:46Z</dc:date>
    </item>
    <item>
      <title>Re: YOY % Growth by Distinct Customer ID</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/YOY-Growth-by-Distinct-Customer-ID/m-p/2767893#M86029</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;, Your last solution is close, but something is wrong with the calculation. See the screenshot below with numbers from the last formula you submitted.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, the 2021 value for YOY % Growth of Running Total should be 28.8% by this formula:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;((Current Year # - Previous Year #)/(Previous Year #))*100:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;((746-579)/(579))*100 = 28.8&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;&lt;P&gt;***Edit, the correct % increase is returned if you make the change to&amp;nbsp;&lt;EM&gt;VAR _previous_year_count&lt;/EM&gt; in bold below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;EM&gt;Year-over-Year Growth =&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;VAR _year =&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; MAX ( 'Calendar'[Year] )&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;VAR _category =&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; MAX ( 'Table'[category] )&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;VAR _current_count =&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; CALCULATE (&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; COUNT ( 'Table'[customerID] ),&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; '&lt;STRONG&gt;Calendar'[Year] &amp;lt;= _year,&lt;/STRONG&gt;&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'Table'[category] = _category&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; )&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;VAR _previous_year_count =&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; CALCULATE (&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; COUNT ( 'Table'[customerID] ),&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; '&lt;STRONG&gt;Calendar'[Year] &amp;lt;= _year - 1&lt;/STRONG&gt;,&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'Table'[category] = _category&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; ) + 0&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;VAR _growth =&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; DIVIDE ( _current_count - _previous_year_count, _previous_year_count )&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;RETURN&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; _growth&lt;/EM&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Sep 2022 16:39:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/YOY-Growth-by-Distinct-Customer-ID/m-p/2767893#M86029</guid>
      <dc:creator>DataScope06</dc:creator>
      <dc:date>2022-09-14T16:39:46Z</dc:date>
    </item>
    <item>
      <title>Re: YOY % Growth by Distinct Customer ID</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/YOY-Growth-by-Distinct-Customer-ID/m-p/2768566#M86085</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="439915" data-lia-user-login="DataScope06" class="lia-mention lia-mention-user"&gt;DataScope06&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Great!&lt;span class="lia-unicode-emoji" title=":smiling_face_with_sunglasses:"&gt;😎&lt;/span&gt;&lt;BR /&gt;Please consider accepting your reply to close this thread. thanks.&lt;BR /&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;Best Regards,&lt;BR /&gt;Gao&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;Community Support Team&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Sep 2022 01:22:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/YOY-Growth-by-Distinct-Customer-ID/m-p/2768566#M86085</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-09-15T01:22:12Z</dc:date>
    </item>
  </channel>
</rss>

