<?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: Calculation issues - weird grouping based on the numerical values in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculation-issues-weird-grouping-based-on-the-numerical-values/m-p/3997836#M155479</link>
    <description>&lt;P&gt;Hi thanks for your response but unfortunately it does not work. Now it sums all capacity of all products and all companies I have in my database (I have more than one product, one company)&lt;/P&gt;</description>
    <pubDate>Tue, 18 Jun 2024 08:38:32 GMT</pubDate>
    <dc:creator>my_microsoftacc</dc:creator>
    <dc:date>2024-06-18T08:38:32Z</dc:date>
    <item>
      <title>Calculation issues - weird grouping based on the numerical values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculation-issues-weird-grouping-based-on-the-numerical-values/m-p/3988829#M154606</link>
      <description>&lt;P&gt;Hi everyone,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a database of different companies' capacity per year.&lt;/P&gt;&lt;P&gt;The measures I created are:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;YTD Capacity: calculates the accumulated capacity up until the year before the filtered year.&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;YTD Capacity =&lt;/SPAN&gt; &lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;sum&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Table'&lt;/SPAN&gt;&lt;SPAN&gt;[Capacity]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;filter&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;all&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Table'&lt;/SPAN&gt;&lt;SPAN&gt;[Year]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;'Table'&lt;/SPAN&gt;&lt;SPAN&gt;[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;'Table'&lt;/SPAN&gt;&lt;SPAN&gt;[Year]&lt;/SPAN&gt;&lt;SPAN&gt;)))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;Total capacity: calculates the total capacity of all years.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Total Capacity =&lt;/SPAN&gt; &lt;SPAN&gt;calculate&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;sum&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Table'&lt;/SPAN&gt;&lt;SPAN&gt;[Capacity]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;all&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Table'&lt;/SPAN&gt;&lt;SPAN&gt;[Year]&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;However, for some reason, PowerBI calculates the sum based on the distinct values of the capacity. As seen in pic below, e.g: year 2015 with capacity of 120 is one group, year 2016 - 2019 with the same capacity of 150 is one group, capacity of 153 is one group etc..&lt;/DIV&gt;&lt;DIV&gt;The data shown belongs to one company.&lt;/DIV&gt;&lt;DIV&gt;Does anyone know what might be the reason for it and how to fix it? Thanks&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jun 2024 14:04:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculation-issues-weird-grouping-based-on-the-numerical-values/m-p/3988829#M154606</guid>
      <dc:creator>my_microsoftacc</dc:creator>
      <dc:date>2024-06-12T14:04:42Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation issues - weird grouping based on the numerical values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculation-issues-weird-grouping-based-on-the-numerical-values/m-p/3989730#M154698</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>Thu, 13 Jun 2024 00:19:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculation-issues-weird-grouping-based-on-the-numerical-values/m-p/3989730#M154698</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-06-13T00:19:38Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation issues - weird grouping based on the numerical values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculation-issues-weird-grouping-based-on-the-numerical-values/m-p/3992648#M154971</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="521925" data-lia-user-login="my_microsoftacc" class="lia-mention lia-mention-user"&gt;my_microsoftacc&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I create a table as you mentioned.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;I think you can change your DAX codes, here is my DAX code.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;YTD Capacity1 = 
CALCULATE(
    SUMX(
        FILTER(
            ALL('Table'),
            'Table'[Year] &amp;lt; MAX('Table'[Year])
        ),
        'Table'[Capacity]
    )
)&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Total Capacity1 = 
SUMX(
    ALL('Table'),
    'Table'[Capacity]
)&lt;/LI-CODE&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;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin-bottom: 6.0pt;"&gt;&lt;SPAN&gt;Best Regards&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin-bottom: 6.0pt;"&gt;&lt;SPAN&gt;Yilong Zhou&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin-bottom: 6.0pt;"&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;STRONG&gt;&lt;I&gt;helps&lt;/I&gt;&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;I&gt;Accept it as the solution&lt;/I&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jun 2024 06:38:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculation-issues-weird-grouping-based-on-the-numerical-values/m-p/3992648#M154971</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-06-14T06:38:19Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation issues - weird grouping based on the numerical values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculation-issues-weird-grouping-based-on-the-numerical-values/m-p/3997836#M155479</link>
      <description>&lt;P&gt;Hi thanks for your response but unfortunately it does not work. Now it sums all capacity of all products and all companies I have in my database (I have more than one product, one company)&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jun 2024 08:38:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculation-issues-weird-grouping-based-on-the-numerical-values/m-p/3997836#M155479</guid>
      <dc:creator>my_microsoftacc</dc:creator>
      <dc:date>2024-06-18T08:38:32Z</dc:date>
    </item>
  </channel>
</rss>

