<?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: Calculate average of sum of production for each code in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-average-of-sum-of-production-for-each-code/m-p/3677821#M142793</link>
    <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you provide more details about the data and expected output? Sample data. The problem statement is not very clear.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regads&lt;/P&gt;</description>
    <pubDate>Sat, 03 Feb 2024 15:21:17 GMT</pubDate>
    <dc:creator>qqqqqwwwweeerrr</dc:creator>
    <dc:date>2024-02-03T15:21:17Z</dc:date>
    <item>
      <title>Calculate average of sum of production for each code</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-average-of-sum-of-production-for-each-code/m-p/3675300#M142659</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;I am having a date filter with values year, month and day. I am having a table with two columns - one with code (it has duplicates) and corresponding productions for the day selected. I tried the following measure but its wrong.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;CALCULATE(SUMX(VALUES('WASTAGE'[CODE]), AVERAGE('WASTAGE'[PRODUCTION])))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone help ?&lt;/P&gt;</description>
      <pubDate>Fri, 02 Feb 2024 10:11:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-average-of-sum-of-production-for-each-code/m-p/3675300#M142659</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-02-02T10:11:04Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate average of sum of production for each code</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-average-of-sum-of-production-for-each-code/m-p/3677821#M142793</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you provide more details about the data and expected output? Sample data. The problem statement is not very clear.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regads&lt;/P&gt;</description>
      <pubDate>Sat, 03 Feb 2024 15:21:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-average-of-sum-of-production-for-each-code/m-p/3677821#M142793</guid>
      <dc:creator>qqqqqwwwweeerrr</dc:creator>
      <dc:date>2024-02-03T15:21:17Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate average of sum of production for each code</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-average-of-sum-of-production-for-each-code/m-p/3678722#M142845</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="625628" data-lia-user-login="qqqqqwwwweeerrr" class="lia-mention lia-mention-user"&gt;qqqqqwwwweeerrr&lt;/a&gt;&amp;nbsp;, thanks for your response.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Iam having a date filter. On selecting the date I want (4th-jan-2023 here) i want to calculate the total sum of averages of the production wrt to the code i.e ((800+800+.....+800)/7) + ((11776+ 11776+ .....11776)/5) =&amp;gt; 800+11776 = 12567&lt;BR /&gt;&lt;BR /&gt;I have tried the following measure ,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Total_production = SUMX(VALUES('WASTAGE'[CODE]), AVERAGE('WASTAGE'[PRODUCTION]))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and im getting 10,746 as the result for the above data which is wrong. Any help is appreciated.&lt;BR /&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Sun, 04 Feb 2024 20:08:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-average-of-sum-of-production-for-each-code/m-p/3678722#M142845</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-02-04T20:08:09Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate average of sum of production for each code</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-average-of-sum-of-production-for-each-code/m-p/3680741#M142932</link>
      <description>&lt;P&gt;Hi , I found a working solution to the above problem. Im adding it here just for reference.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;NTest = 
var x = SUMX(SUMMARIZE(WASTAGE,(WASTAGE[CODE]), "Summ", sum(WASTAGE[PRODUCTION])), [Summ])
var y = count(WASTAGE[PRODUCTION])
return
x/y

NTest1 = 
VAR a = VALUES( WASTAGE[CODE] )
VAR Result = SUMX(a,[NTest])
RETURN 
IF(HASONEFILTER(WASTAGE[CODE]), [NTest], Result)&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 05 Feb 2024 16:09:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-average-of-sum-of-production-for-each-code/m-p/3680741#M142932</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-02-05T16:09:12Z</dc:date>
    </item>
  </channel>
</rss>

