<?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 Looking for help with aggregating data correctly in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Looking-for-help-with-aggregating-data-correctly/m-p/3799286#M148514</link>
    <description>&lt;P&gt;I've got a dataset that has the following columns, on mobile so apologies for formatting&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example of data:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ProjectID | OriginalBudget | NewAmount | IsChangeOrder&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;123 | $100 | $20 | Yes&lt;/P&gt;&lt;P&gt;123 | $100 | $50 | Yes&lt;/P&gt;&lt;P&gt;456 | $200 | $50 | Yes&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One question being asked is what percentage of the project budgets overall are change orders?&lt;/P&gt;&lt;P&gt;The problem I'm running into is when I try to do a measure that divides the sum of the NewAmount by the OriginalAmount is that the OriginalAmount is being added over and over since it exists in every row since one project can have many change orders.&lt;/P&gt;&lt;P&gt;Is there a simple way to do this measure?&lt;/P&gt;</description>
    <pubDate>Fri, 29 Mar 2024 13:38:17 GMT</pubDate>
    <dc:creator>jroob</dc:creator>
    <dc:date>2024-03-29T13:38:17Z</dc:date>
    <item>
      <title>Looking for help with aggregating data correctly</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Looking-for-help-with-aggregating-data-correctly/m-p/3799286#M148514</link>
      <description>&lt;P&gt;I've got a dataset that has the following columns, on mobile so apologies for formatting&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example of data:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ProjectID | OriginalBudget | NewAmount | IsChangeOrder&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;123 | $100 | $20 | Yes&lt;/P&gt;&lt;P&gt;123 | $100 | $50 | Yes&lt;/P&gt;&lt;P&gt;456 | $200 | $50 | Yes&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One question being asked is what percentage of the project budgets overall are change orders?&lt;/P&gt;&lt;P&gt;The problem I'm running into is when I try to do a measure that divides the sum of the NewAmount by the OriginalAmount is that the OriginalAmount is being added over and over since it exists in every row since one project can have many change orders.&lt;/P&gt;&lt;P&gt;Is there a simple way to do this measure?&lt;/P&gt;</description>
      <pubDate>Fri, 29 Mar 2024 13:38:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Looking-for-help-with-aggregating-data-correctly/m-p/3799286#M148514</guid>
      <dc:creator>jroob</dc:creator>
      <dc:date>2024-03-29T13:38:17Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for help with aggregating data correctly</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Looking-for-help-with-aggregating-data-correctly/m-p/3799529#M148527</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;yes, here is your solution:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this is your measure:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Measure&lt;/SPAN&gt;&lt;SPAN&gt; =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;original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ubDate>Fri, 29 Mar 2024 16:45:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Looking-for-help-with-aggregating-data-correctly/m-p/3799529#M148527</guid>
      <dc:creator>Gabry</dc:creator>
      <dc:date>2024-03-29T16:45:03Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for help with aggregating data correctly</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Looking-for-help-with-aggregating-data-correctly/m-p/3801244#M148614</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="370638" data-lia-user-login="jroob" class="lia-mention lia-mention-user"&gt;jroob&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;First, create a measure that sums up only once for each budget:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Total Unique Original Budget = 
SUMX(
    SUMMARIZE('Table', 'Table'[ProjectID], "UniqueBudget", MAX('Table'[OriginalBudget])),
    [UniqueBudget]
)&lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;This measure summarizes all values:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Total New Amount = SUM('Table'[NewAmount])&lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;Calculate the percentage:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Percentage of Budget as Change Orders = 
DIVIDE([Total New Amount], [Total Unique Original Budget])&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is my preview:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 6.0pt 0cm 0cm 0cm;"&gt;&lt;SPAN&gt;&lt;A title="https://community.powerbi.com/t5/community-blog/how-to-get-your-question-answered-quickly/ba-p/38490" href="https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcommunity.powerbi.com%2Ft5%2FCommunity-Blog%2FHow-to-Get-Your-Question-Answered-Quickly%2Fba-p%2F38490&amp;amp;data=05%7C02%7Cv-yohua%40microsoft.com%7Ce1106bfabecb4734a5cc08dc2305bc51%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C638423754744679080%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&amp;amp;sdata=24%2BceC5sFd3n3%2FhFDYILWFcNjCwVClBD%2BPBsSLVfJGk%3D&amp;amp;reserved=0" target="_blank" rel="noopener"&gt;How to Get Your Question Answered Quickly&lt;/A&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&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;Yongkang Hua&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;helps&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Apr 2024 03:36:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Looking-for-help-with-aggregating-data-correctly/m-p/3801244#M148614</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-04-01T03:36:51Z</dc:date>
    </item>
  </channel>
</rss>

