<?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 Calculate Total Matrix Using Average in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-To-Calculate-Total-Matrix-Using-Average/m-p/4052981#M160830</link>
    <description>&lt;P&gt;So,&amp;nbsp;I create a measure quantity like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;quantity = 
    SUMX(
        SUMMARIZE(
            'table',
            'table'[product_name],
            'table'[inv_number]
        ),
        CALCULATE(
            AVERAGE(
                'table'[quantity]
            )
        )
    )&lt;/LI-CODE&gt;&lt;P&gt;and then, I made one more measure weight like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;weight = 
    SUMX(
        SUMMARIZE(
            'table',
            'table'[product_name],
            'table'[inv_number]
        ),
        CALCULATE(
            AVERAGE(
                'table'[product_weight]
            )
        )
    )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;last, I made one more measure total weight like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;totalweight = 
SUMX(
     SUMMARIZE(
               'table',
               'table'[product_name],
               'table'[inv_number]
     ),
     [quantity] * [weight]
)&lt;/LI-CODE&gt;&lt;P&gt;the results were as I expected.&lt;BR /&gt;&lt;BR /&gt;Thanks&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 22 Jul 2024 04:31:43 GMT</pubDate>
    <dc:creator>pisca</dc:creator>
    <dc:date>2024-07-22T04:31:43Z</dc:date>
    <item>
      <title>How To Calculate Total Matrix Using Average</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-To-Calculate-Total-Matrix-Using-Average/m-p/4050348#M160690</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a problem when I want to calculate the total weight from the multiplication of quantity and weight.&lt;/P&gt;&lt;P&gt;When I try to use several functions calculated, sum, summarize and average. The result is correct, but the total matrix is wrong.&lt;/P&gt;&lt;P&gt;My database is as below:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;I want to produce as shown below:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;What kind of dax function should be created so that the values are correct?&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jul 2024 08:59:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-To-Calculate-Total-Matrix-Using-Average/m-p/4050348#M160690</guid>
      <dc:creator>pisca</dc:creator>
      <dc:date>2024-07-19T08:59:31Z</dc:date>
    </item>
    <item>
      <title>Re: How To Calculate Total Matrix Using Average</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-To-Calculate-Total-Matrix-Using-Average/m-p/4050506#M160706</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="268000" data-lia-user-login="pisca" class="lia-mention lia-mention-user"&gt;pisca&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;You may try&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;Total Weight =
SUMX (
    SUMMARIZE ( 'Table', 'Table'[product_name], 'Table'[invoice-number] ),
    [Quantity (Pack)] * [Weigh (kg)]
)&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 19 Jul 2024 10:07:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-To-Calculate-Total-Matrix-Using-Average/m-p/4050506#M160706</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2024-07-19T10:07:07Z</dc:date>
    </item>
    <item>
      <title>Re: How To Calculate Total Matrix Using Average</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-To-Calculate-Total-Matrix-Using-Average/m-p/4052676#M160818</link>
      <description>&lt;P&gt;Thanks tamerj1,&lt;/P&gt;&lt;P&gt;after I tried the dax above in the new column, the results are still not correct, because there is still the same product_name in another invoice_number.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;totalweight = 
SUMX(
     SUMMARIZE(
               'table',
               'table'[product_name],
               'table'[inv_number]
     ),
     'table'[quantity] * 'table'[product_weight]
)&lt;/LI-CODE&gt;&lt;P&gt;build visual matrix as shown below&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;the result is like this.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;I have tried changing the values sum to other options such as avarage, minimum, maximum, etc.&lt;BR /&gt;the results are still not as expected.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jul 2024 01:31:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-To-Calculate-Total-Matrix-Using-Average/m-p/4052676#M160818</guid>
      <dc:creator>pisca</dc:creator>
      <dc:date>2024-07-22T01:31:12Z</dc:date>
    </item>
    <item>
      <title>Re: How To Calculate Total Matrix Using Average</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-To-Calculate-Total-Matrix-Using-Average/m-p/4052928#M160827</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Oh it worked when I made it as a measure.&lt;/P&gt;&lt;P&gt;So I create the same measure as total weight with the name quantity and weight, then I use the formula above, it works.&lt;/P&gt;&lt;P&gt;Give me time to try other product names. I'll let you know the results soon.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jul 2024 03:19:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-To-Calculate-Total-Matrix-Using-Average/m-p/4052928#M160827</guid>
      <dc:creator>pisca</dc:creator>
      <dc:date>2024-07-22T03:19:11Z</dc:date>
    </item>
    <item>
      <title>Re: How To Calculate Total Matrix Using Average</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-To-Calculate-Total-Matrix-Using-Average/m-p/4052981#M160830</link>
      <description>&lt;P&gt;So,&amp;nbsp;I create a measure quantity like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;quantity = 
    SUMX(
        SUMMARIZE(
            'table',
            'table'[product_name],
            'table'[inv_number]
        ),
        CALCULATE(
            AVERAGE(
                'table'[quantity]
            )
        )
    )&lt;/LI-CODE&gt;&lt;P&gt;and then, I made one more measure weight like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;weight = 
    SUMX(
        SUMMARIZE(
            'table',
            'table'[product_name],
            'table'[inv_number]
        ),
        CALCULATE(
            AVERAGE(
                'table'[product_weight]
            )
        )
    )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;last, I made one more measure total weight like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;totalweight = 
SUMX(
     SUMMARIZE(
               'table',
               'table'[product_name],
               'table'[inv_number]
     ),
     [quantity] * [weight]
)&lt;/LI-CODE&gt;&lt;P&gt;the results were as I expected.&lt;BR /&gt;&lt;BR /&gt;Thanks&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jul 2024 04:31:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-To-Calculate-Total-Matrix-Using-Average/m-p/4052981#M160830</guid>
      <dc:creator>pisca</dc:creator>
      <dc:date>2024-07-22T04:31:43Z</dc:date>
    </item>
  </channel>
</rss>

