<?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: not the same total while averaging in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/not-the-same-total-while-averaging/m-p/3606634#M139341</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="494564" data-lia-user-login="Easley08" class="lia-mention lia-mention-user"&gt;Easley08&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Yes, you need the CALCUALTE here to do the context-transition.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 29 Dec 2023 08:24:48 GMT</pubDate>
    <dc:creator>Fowmy</dc:creator>
    <dc:date>2023-12-29T08:24:48Z</dc:date>
    <item>
      <title>not the same total while averaging</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/not-the-same-total-while-averaging/m-p/3606554#M139330</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;is there a way to fix this currently i need to combine this measure into 1&amp;nbsp;&lt;/P&gt;&lt;P&gt;the correct out put is &lt;STRONG&gt;Measure which is 64.9&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;currently im using variable to call the Measure&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;Finished Lead Cost ULAB = DIVIDE([ULAB Buying PHP/kg],AVERAGE(pb_percent[pb_ulab]),0)+SUM(raw_mats[ulab_php_conversion_cost_kg])-[Plastic Savings / kg]&lt;/STRONG&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;Measure = AVERAGEX( VALUES('Calendar Table'[Date]),[Finished Lead Cost ULAB])&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;Finished Lead Cost ULAB1 =&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;Var&amp;nbsp;Finished Lead Cost ULAB = DIVIDE([ULAB Buying PHP/kg],AVERAGE(pb_percent[pb_ulab]),0)+SUM(raw_mats[ulab_php_conversion_cost_kg])-[Plastic Savings / kg]&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;var&amp;nbsp;Measure&amp;nbsp;= AVERAGEX(VALUES('Calendar Table'[Date]),Finished Lead Cost ULAB )&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;RETURN&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;Measure&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;why im getting the wrong total when im just using the variable.&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Dec 2023 07:15:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/not-the-same-total-while-averaging/m-p/3606554#M139330</guid>
      <dc:creator>Easley08</dc:creator>
      <dc:date>2023-12-29T07:15:16Z</dc:date>
    </item>
    <item>
      <title>Re: not the same total while averaging</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/not-the-same-total-while-averaging/m-p/3606563#M139332</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="494564" data-lia-user-login="Easley08" class="lia-mention lia-mention-user"&gt;Easley08&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;You cannot use a variable (ans) inside an interation as the variable once assigned behaves like a constant.&lt;BR /&gt;&lt;BR /&gt;Use this meaure:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Finished Lead Cost ULAB1 =
AVERAGEX (
    VALUES ( 'Calendar Table'[Date] ),
    CALCULATE (
        DIVIDE ( [ULAB Buying PHP/kg], AVERAGE ( pb_percent[pb_ulab] ), 0 )
            + SUM ( raw_mats[ulab_php_conversion_cost_kg] ) - [Plastic Savings / kg]
    )
)
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Dec 2023 07:17:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/not-the-same-total-while-averaging/m-p/3606563#M139332</guid>
      <dc:creator>Fowmy</dc:creator>
      <dc:date>2023-12-29T07:17:06Z</dc:date>
    </item>
    <item>
      <title>Re: not the same total while averaging</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/not-the-same-total-while-averaging/m-p/3606586#M139335</link>
      <description>&lt;P&gt;thanks it works i used this measure also but without the calculate thats why im getting the wrong total.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Dec 2023 07:49:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/not-the-same-total-while-averaging/m-p/3606586#M139335</guid>
      <dc:creator>Easley08</dc:creator>
      <dc:date>2023-12-29T07:49:34Z</dc:date>
    </item>
    <item>
      <title>Re: not the same total while averaging</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/not-the-same-total-while-averaging/m-p/3606634#M139341</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="494564" data-lia-user-login="Easley08" class="lia-mention lia-mention-user"&gt;Easley08&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Yes, you need the CALCUALTE here to do the context-transition.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Dec 2023 08:24:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/not-the-same-total-while-averaging/m-p/3606634#M139341</guid>
      <dc:creator>Fowmy</dc:creator>
      <dc:date>2023-12-29T08:24:48Z</dc:date>
    </item>
  </channel>
</rss>

