<?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: How to Sum Quantities and Adjust for Repeated Values in DAX in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-Sum-Quantities-and-Adjust-for-Repeated-Values-in-DAX/m-p/3547987#M136449</link>
    <description>&lt;P&gt;Please provide sample data (with sensitive information removed) 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). Leave out anything not related to the issue. &lt;BR /&gt;If you are unsure how to do that 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;Please show the expected outcome based on the sample data you provided. &lt;BR /&gt;&lt;BR /&gt;If you want to get answers faster please refer to &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, 23 Nov 2023 02:21:13 GMT</pubDate>
    <dc:creator>lbendlin</dc:creator>
    <dc:date>2023-11-23T02:21:13Z</dc:date>
    <item>
      <title>How to Sum Quantities and Adjust for Repeated Values in DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-Sum-Quantities-and-Adjust-for-Repeated-Values-in-DAX/m-p/3544476#M136281</link>
      <description>&lt;P&gt;I'm working with a dataset in DAX where I encounter repeating values labeled as "nominal" and "opening" for each combination of date and wonumber. My objective is to sum the quantities for each date and wonumber. However, I need to adjust this sum by considering only one occurrence of either "nominal" or "opening" in each date and wonumber combination.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could someone assist me with the DAX formula needed to sum the quantities per date and wonumber, and then divide this sum by the count of unique occurrences of "nominal" and "opening" for each date and wonumber combination?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example illustrating the shape of the data and the calculation :&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Any help would be greatly appreciated!&lt;/P&gt;</description>
      <pubDate>Tue, 21 Nov 2023 10:59:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-Sum-Quantities-and-Adjust-for-Repeated-Values-in-DAX/m-p/3544476#M136281</guid>
      <dc:creator>Lazurens</dc:creator>
      <dc:date>2023-11-21T10:59:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to Sum Quantities and Adjust for Repeated Values in DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-Sum-Quantities-and-Adjust-for-Repeated-Values-in-DAX/m-p/3547987#M136449</link>
      <description>&lt;P&gt;Please provide sample data (with sensitive information removed) 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). Leave out anything not related to the issue. &lt;BR /&gt;If you are unsure how to do that 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;Please show the expected outcome based on the sample data you provided. &lt;BR /&gt;&lt;BR /&gt;If you want to get answers faster please refer to &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, 23 Nov 2023 02:21:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-Sum-Quantities-and-Adjust-for-Repeated-Values-in-DAX/m-p/3547987#M136449</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2023-11-23T02:21:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to Sum Quantities and Adjust for Repeated Values in DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-Sum-Quantities-and-Adjust-for-Repeated-Values-in-DAX/m-p/3548673#M136481</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="386160" data-lia-user-login="Lazurens" class="lia-mention lia-mention-user"&gt;Lazurens&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I created a sample pbix file(see&lt;EM&gt;&lt;STRONG&gt; the attachment&lt;/STRONG&gt;&lt;/EM&gt;), please check if that is what you want.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Result = 
VAR _tab =
    SUMMARIZE (
        'Table',
        'Table'[Date production],
        'Table'[Wnum],
        'Table'[Nominal],
        'Table'[Opening],
        "@sumofqty", SUM ( 'Table'[Quantity] )
    )
VAR _qty =
    SUMX ( _tab, [@sumofqty] )
VAR _nominal =
    MAXX ( _tab, [Nominal] )
VAR _opening =
    MAXX ( _tab, [Opening] )
RETURN 
    _qty / DIVIDE ( _opening, 3600 ) * _nominal&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;</description>
      <pubDate>Thu, 23 Nov 2023 09:50:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-Sum-Quantities-and-Adjust-for-Repeated-Values-in-DAX/m-p/3548673#M136481</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-11-23T09:50:10Z</dc:date>
    </item>
  </channel>
</rss>

