<?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: Get the percentage for each year, not for the total in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-the-percentage-for-each-year-not-for-the-total/m-p/3842698#M150224</link>
    <description>&lt;P&gt;Please provide sample data that covers your issue or question &lt;STRONG&gt;completely&lt;/STRONG&gt;, in a &lt;STRONG&gt;usable&lt;/STRONG&gt; format (not as a screenshot).&lt;BR /&gt;&lt;BR /&gt;Do not include sensitive information or anything not related to the issue or question. &lt;BR /&gt;&lt;BR /&gt;If you are unsure how to upload data please refer to &lt;A href="https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216&lt;/A&gt; &lt;BR /&gt;&lt;BR /&gt;Please show the expected outcome based on the sample data you provided. &lt;BR /&gt;&lt;BR /&gt;Want faster answers? &lt;A href="https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 16 Apr 2024 21:46:48 GMT</pubDate>
    <dc:creator>lbendlin</dc:creator>
    <dc:date>2024-04-16T21:46:48Z</dc:date>
    <item>
      <title>Get the percentage for each year, not for the total</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-the-percentage-for-each-year-not-for-the-total/m-p/3840838#M150157</link>
      <description>&lt;P&gt;Hello there,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a ribbon chart that shows the evolution&amp;nbsp;of the weight of phone parts through the years.&lt;BR /&gt;I would like to know the breakdown for each year.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the measure I use :&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Parts weight (kg) average per phone Model (%) = 
DIVIDE(
    SUM(PHONE_PRODUCTION[Production]) * [Parts weight (kg) average per Model],

    CALCULATE(
        [Parts weight (kg) average per Model],
        KEEPFILTERS(VALUES('PHONE_PARTS'[Model name])),
        ALLEXCEPT(PHONE_PARTS, PHONE_PARTS[Group name], PHONE_PARTS[Material])
    )
    * CALCULATE(
        SUM(PHONE_PRODUCTION[Production]), 
        ALLSELECTED(PHONE_PRODUCTION[Year of production])
    )
    ,
    0
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And here is the result I get :&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;STRONG&gt;X Axis&lt;/STRONG&gt; = Year of production&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Y Axis&lt;/STRONG&gt; = the above measure (Parts weight (kg) average per phone Model (%))&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Legend&lt;/STRONG&gt; = part category (it has 3 types, represented by the 3 colors)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem I have is that it&amp;nbsp;calculates the percentage of the total selected period (here 2013 to 2016) and not for each year.&lt;/P&gt;&lt;P&gt;When all the values added up, you get 100%. This is not the behavior I want. I want the sum to be 100% for each year.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is an example of what I would like to get :&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;What is wrong with my measure ?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;It definitely comes from the&amp;nbsp;denominator since DAX divides each value by the entire period.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried almost everything (ALLEXCEPT, ALLSELECTED, ALL, KEEPFILTERS) but nothing works...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help !&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Apr 2024 09:50:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-the-percentage-for-each-year-not-for-the-total/m-p/3840838#M150157</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-04-16T09:50:26Z</dc:date>
    </item>
    <item>
      <title>Re: Get the percentage for each year, not for the total</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-the-percentage-for-each-year-not-for-the-total/m-p/3842698#M150224</link>
      <description>&lt;P&gt;Please provide sample data that covers your issue or question &lt;STRONG&gt;completely&lt;/STRONG&gt;, in a &lt;STRONG&gt;usable&lt;/STRONG&gt; format (not as a screenshot).&lt;BR /&gt;&lt;BR /&gt;Do not include sensitive information or anything not related to the issue or question. &lt;BR /&gt;&lt;BR /&gt;If you are unsure how to upload data please refer to &lt;A href="https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216&lt;/A&gt; &lt;BR /&gt;&lt;BR /&gt;Please show the expected outcome based on the sample data you provided. &lt;BR /&gt;&lt;BR /&gt;Want faster answers? &lt;A href="https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Apr 2024 21:46:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-the-percentage-for-each-year-not-for-the-total/m-p/3842698#M150224</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-04-16T21:46:48Z</dc:date>
    </item>
  </channel>
</rss>

