<?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: Running Total with Matrix(Year of date) in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-Total-with-Matrix-Year-of-date/m-p/4689864#M179598</link>
    <description>&lt;P&gt;Hi, I am not sure how your semantic model looks like, but if you are looking for the selected years rank, please check the below picture and the attached pbix file.&lt;/P&gt;
&lt;P&gt;I think, please correct me if I am wrong, in each year, the ranking of cities are different. If you want to rank the cities for all selected years, please check the below.&amp;nbsp;&lt;BR /&gt;Window DAX function is used in the measure.&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;
&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;&lt;A href="https://learn.microsoft.com/en-us/dax/window-function-dax?wt.mc_id=DP-MVP-5004989" target="_blank"&gt;WINDOW function (DAX) - DAX | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;total sales: = 
SUM( orders_fact[sales] )&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;cumulative sales: = 
VAR _cumulate =
    WINDOW (
        1,
        ABS,
        0,
        REL,
        ALL ( city_dimension[city] ),
        ORDERBY (
            CALCULATE (
                [total sales:],
                ALLSELECTED ( year_dimension[year] )
            ), DESC
        )
    )
RETURN
    CALCULATE (
        [total sales:],
        _cumulate
    )&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 12 May 2025 22:08:01 GMT</pubDate>
    <dc:creator>Jihwan_Kim</dc:creator>
    <dc:date>2025-05-12T22:08:01Z</dc:date>
    <item>
      <title>Running Total with Matrix(Year of date)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-Total-with-Matrix-Year-of-date/m-p/4689670#M179594</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I am new to Power BI. I am facing an issue with Running Total in Matrix visual as below mentioned.&amp;nbsp;&lt;BR /&gt;When I am using single year as 2016, it will giving correct value.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;but once I am using multip years the flow was breaking, as you can see below image&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;here is the dax expression I am using for this&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;can someone help where I am doing wrong&lt;/STRONG&gt; ?&amp;nbsp;&lt;BR /&gt;Thanks for advance&lt;BR /&gt;Khalandar.&lt;/P&gt;</description>
      <pubDate>Mon, 12 May 2025 17:41:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-Total-with-Matrix-Year-of-date/m-p/4689670#M179594</guid>
      <dc:creator>Khalandar</dc:creator>
      <dc:date>2025-05-12T17:41:36Z</dc:date>
    </item>
    <item>
      <title>Re: Running Total with Matrix(Year of date)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-Total-with-Matrix-Year-of-date/m-p/4689864#M179598</link>
      <description>&lt;P&gt;Hi, I am not sure how your semantic model looks like, but if you are looking for the selected years rank, please check the below picture and the attached pbix file.&lt;/P&gt;
&lt;P&gt;I think, please correct me if I am wrong, in each year, the ranking of cities are different. If you want to rank the cities for all selected years, please check the below.&amp;nbsp;&lt;BR /&gt;Window DAX function is used in the measure.&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;
&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;&lt;A href="https://learn.microsoft.com/en-us/dax/window-function-dax?wt.mc_id=DP-MVP-5004989" target="_blank"&gt;WINDOW function (DAX) - DAX | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;total sales: = 
SUM( orders_fact[sales] )&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;cumulative sales: = 
VAR _cumulate =
    WINDOW (
        1,
        ABS,
        0,
        REL,
        ALL ( city_dimension[city] ),
        ORDERBY (
            CALCULATE (
                [total sales:],
                ALLSELECTED ( year_dimension[year] )
            ), DESC
        )
    )
RETURN
    CALCULATE (
        [total sales:],
        _cumulate
    )&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 12 May 2025 22:08:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Running-Total-with-Matrix-Year-of-date/m-p/4689864#M179598</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2025-05-12T22:08:01Z</dc:date>
    </item>
  </channel>
</rss>

