<?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 Running Total for product numbers by categories in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-Total-for-product-numbers-by-categories/m-p/4011476#M157902</link>
    <description>&lt;P&gt;Hello experts,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope someone can help me with my DAX formula.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the following situation: I wish to create a Measure which gives me the running total for a distinct count of my product numbers by their publishing year. For this, I created the following measure:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;Running Total product number (Publishing Year) =&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;DISTINCTCOUNT&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Product'&lt;/SPAN&gt;&lt;SPAN&gt;[Product number]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;FILTER&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;ALL&lt;/SPAN&gt;&lt;SPAN&gt; ( &lt;/SPAN&gt;&lt;SPAN&gt;'Product'&lt;/SPAN&gt;&lt;SPAN&gt;[Publishing Year]&lt;/SPAN&gt;&lt;SPAN&gt; ),&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;'Product'&lt;/SPAN&gt;&lt;SPAN&gt;[Publishing Year]&lt;/SPAN&gt;&lt;SPAN&gt; &amp;lt;= &lt;/SPAN&gt;&lt;SPAN&gt;MAX&lt;/SPAN&gt;&lt;SPAN&gt; ( &lt;/SPAN&gt;&lt;SPAN&gt;'Product'&lt;/SPAN&gt;&lt;SPAN&gt;[Publishing Year]&lt;/SPAN&gt;&lt;SPAN&gt; )&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; )&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;This measure works just fine, when no further level of detail is required. However, in combination with the use of categories (in my case a product brand clustering). The running total only extends to the last year in which a product is published. This leads to incorrect totals:&lt;/P&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;DIV&gt;E.g. The red part in 2028 would be 171 and not 0.&lt;BR /&gt;&lt;P&gt;Currently, my DAX formula leads to this result in a table format:&lt;/P&gt;&amp;nbsp;&lt;img /&gt;&lt;P&gt;&lt;SPAN&gt;What I would like to achieve is the following:&lt;/SPAN&gt;&lt;/P&gt;&lt;img /&gt;&lt;P&gt;Note: Publishing year is not a in separate date table but an integer value in the product table.&lt;/P&gt;&lt;/DIV&gt;</description>
    <pubDate>Wed, 26 Jun 2024 14:19:03 GMT</pubDate>
    <dc:creator>00Kevin00</dc:creator>
    <dc:date>2024-06-26T14:19:03Z</dc:date>
    <item>
      <title>Running Total for product numbers by categories</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-Total-for-product-numbers-by-categories/m-p/4011476#M157902</link>
      <description>&lt;P&gt;Hello experts,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope someone can help me with my DAX formula.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the following situation: I wish to create a Measure which gives me the running total for a distinct count of my product numbers by their publishing year. For this, I created the following measure:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;Running Total product number (Publishing Year) =&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;DISTINCTCOUNT&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Product'&lt;/SPAN&gt;&lt;SPAN&gt;[Product number]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;FILTER&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;ALL&lt;/SPAN&gt;&lt;SPAN&gt; ( &lt;/SPAN&gt;&lt;SPAN&gt;'Product'&lt;/SPAN&gt;&lt;SPAN&gt;[Publishing Year]&lt;/SPAN&gt;&lt;SPAN&gt; ),&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;'Product'&lt;/SPAN&gt;&lt;SPAN&gt;[Publishing Year]&lt;/SPAN&gt;&lt;SPAN&gt; &amp;lt;= &lt;/SPAN&gt;&lt;SPAN&gt;MAX&lt;/SPAN&gt;&lt;SPAN&gt; ( &lt;/SPAN&gt;&lt;SPAN&gt;'Product'&lt;/SPAN&gt;&lt;SPAN&gt;[Publishing Year]&lt;/SPAN&gt;&lt;SPAN&gt; )&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; )&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;This measure works just fine, when no further level of detail is required. However, in combination with the use of categories (in my case a product brand clustering). The running total only extends to the last year in which a product is published. This leads to incorrect totals:&lt;/P&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;DIV&gt;E.g. The red part in 2028 would be 171 and not 0.&lt;BR /&gt;&lt;P&gt;Currently, my DAX formula leads to this result in a table format:&lt;/P&gt;&amp;nbsp;&lt;img /&gt;&lt;P&gt;&lt;SPAN&gt;What I would like to achieve is the following:&lt;/SPAN&gt;&lt;/P&gt;&lt;img /&gt;&lt;P&gt;Note: Publishing year is not a in separate date table but an integer value in the product table.&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 26 Jun 2024 14:19:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-Total-for-product-numbers-by-categories/m-p/4011476#M157902</guid>
      <dc:creator>00Kevin00</dc:creator>
      <dc:date>2024-06-26T14:19:03Z</dc:date>
    </item>
    <item>
      <title>Re: Running Total for product numbers by categories</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-Total-for-product-numbers-by-categories/m-p/4011681#M157946</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Please try something like below whether it suits your requirement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Running Total product number (Publishing Year) =
COUNTROWS (
    SUMMARIZE (
        FILTER (
            ALL ( 'Product' ),
            'Product'[Product number] = MAX ( 'Product'[Product number] )
                &amp;amp;&amp;amp; 'Product'[Publishing Year] &amp;lt;= MAX ( 'Product'[Publishing Year] )
        ),
        'Product'[Product number]
    )
)
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jun 2024 16:11:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-Total-for-product-numbers-by-categories/m-p/4011681#M157946</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2024-06-26T16:11:55Z</dc:date>
    </item>
    <item>
      <title>Re: Running Total for product numbers by categories</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-Total-for-product-numbers-by-categories/m-p/4018037#M158452</link>
      <description>&lt;P&gt;Unfortunately, this does not lead to the wished result. Below you can see the outcome with this DAX-formula:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jul 2024 07:37:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-Total-for-product-numbers-by-categories/m-p/4018037#M158452</guid>
      <dc:creator>00Kevin00</dc:creator>
      <dc:date>2024-07-01T07:37:19Z</dc:date>
    </item>
  </channel>
</rss>

