<?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: Total sum for equal values - measure in Power BI in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Total-sum-for-equal-values-measure-in-Power-BI/m-p/4151279#M164960</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Please check the below picture and the attached pbix file.&lt;/P&gt;
&lt;P&gt;I am not sure how your semantic model looks like, but I tried to create a sample pbix file like below.&lt;/P&gt;
&lt;P&gt;One of ways to achieve this is using WINDOW dax function and try order the sequence by percent value descending and by type number ascending at the same time.&lt;BR /&gt;&lt;BR /&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;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;LI-CODE lang="markup"&gt;expected result measure: =
CALCULATE (
    [percent %],
    WINDOW (
        1,
        ABS,
        0,
        REL,
        ALL ( data[type] ),
        ORDERBY ( [percent %], DESC, data[type], ASC )
    )
)
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 15 Sep 2024 13:21:42 GMT</pubDate>
    <dc:creator>Jihwan_Kim</dc:creator>
    <dc:date>2024-09-15T13:21:42Z</dc:date>
    <item>
      <title>Total sum for equal values - measure in Power BI</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Total-sum-for-equal-values-measure-in-Power-BI/m-p/4151242#M164958</link>
      <description>&lt;P&gt;Hey,&lt;/P&gt;&lt;P&gt;I would like to kindly ask for help on writing a measure that will add line by line a variable called “%”&lt;/P&gt;&lt;P&gt;I have a table in Power BI:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And I need a table with the measure “Total sum” as below:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My problem is to calculate the cumulative sum for values that are the same, maybe it is possible to add the ranking per row, where for 17% will be 1 and 2?&lt;BR /&gt;Thank you in advance for your help!&lt;/P&gt;</description>
      <pubDate>Sun, 15 Sep 2024 12:10:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Total-sum-for-equal-values-measure-in-Power-BI/m-p/4151242#M164958</guid>
      <dc:creator>mniepytalska_</dc:creator>
      <dc:date>2024-09-15T12:10:34Z</dc:date>
    </item>
    <item>
      <title>Re: Total sum for equal values - measure in Power BI</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Total-sum-for-equal-values-measure-in-Power-BI/m-p/4151279#M164960</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Please check the below picture and the attached pbix file.&lt;/P&gt;
&lt;P&gt;I am not sure how your semantic model looks like, but I tried to create a sample pbix file like below.&lt;/P&gt;
&lt;P&gt;One of ways to achieve this is using WINDOW dax function and try order the sequence by percent value descending and by type number ascending at the same time.&lt;BR /&gt;&lt;BR /&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;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;LI-CODE lang="markup"&gt;expected result measure: =
CALCULATE (
    [percent %],
    WINDOW (
        1,
        ABS,
        0,
        REL,
        ALL ( data[type] ),
        ORDERBY ( [percent %], DESC, data[type], ASC )
    )
)
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 15 Sep 2024 13:21:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Total-sum-for-equal-values-measure-in-Power-BI/m-p/4151279#M164960</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2024-09-15T13:21:42Z</dc:date>
    </item>
    <item>
      <title>Re: Total sum for equal values - measure in Power BI</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Total-sum-for-equal-values-measure-in-Power-BI/m-p/4152800#M165051</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="291628" data-lia-user-login="Jihwan_Kim" class="lia-mention lia-mention-user"&gt;Jihwan_Kim&lt;/a&gt;&amp;nbsp;Thank you so much! managed to do on my report, on my model :)))&lt;/P&gt;</description>
      <pubDate>Mon, 16 Sep 2024 15:29:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Total-sum-for-equal-values-measure-in-Power-BI/m-p/4152800#M165051</guid>
      <dc:creator>mniepytalska_</dc:creator>
      <dc:date>2024-09-16T15:29:17Z</dc:date>
    </item>
  </channel>
</rss>

