<?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: Compute Average Cost in Power BI (Total Actuals / Count D Sites) in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compute-Average-Cost-in-Power-BI-Total-Actuals-Count-D-Sites/m-p/4814665#M184110</link>
    <description>&lt;P&gt;Hello, Thanks for the response.&lt;BR /&gt;&lt;BR /&gt;Unfortunately, that did not work. I've tried to include all the screenshots below. I thought maybe it's the data format (General vs. Whole Number). Not sure why it's not working. I don't see a way to attach the Power BI file, but if there's a way, please let me know.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 02 Sep 2025 13:21:39 GMT</pubDate>
    <dc:creator>A22MATIC</dc:creator>
    <dc:date>2025-09-02T13:21:39Z</dc:date>
    <item>
      <title>Compute Average Cost in Power BI (Total Actuals / Count D Sites)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compute-Average-Cost-in-Power-BI-Total-Actuals-Count-D-Sites/m-p/4813832#M184107</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm new to Power BI. The forums have been beneficial. I have encountered an issue that I have been unable to find a clear answer for or resolve.&lt;BR /&gt;&lt;BR /&gt;I am trying to calculate the Average Spend &lt;STRONG&gt;$&lt;/STRONG&gt; for the total Count D Sites &lt;STRONG&gt;10&lt;/STRONG&gt; (Total Actuals by Site / Total Count D of Sites). Can anyone assist or point me in the right direction? Thanks.&lt;BR /&gt;&lt;BR /&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Sep 2025 23:12:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compute-Average-Cost-in-Power-BI-Total-Actuals-Count-D-Sites/m-p/4813832#M184107</guid>
      <dc:creator>A22MATIC</dc:creator>
      <dc:date>2025-09-01T23:12:30Z</dc:date>
    </item>
    <item>
      <title>Re: Compute Average Cost in Power BI (Total Actuals / Count D Sites)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compute-Average-Cost-in-Power-BI-Total-Actuals-Count-D-Sites/m-p/4814016#M184108</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1347345" data-lia-user-login="A22MATIC" class="lia-mention lia-mention-user"&gt;A22MATIC&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Create a Measure for Total Spend:&lt;/P&gt;
&lt;P&gt;Go to the "Modeling" tab.&lt;BR /&gt;Click on "New Measure".&lt;BR /&gt;Enter the following DAX formula to calculate the total spend&lt;/P&gt;
&lt;P&gt;Total Spend = SUM('YourTableName'[Total Actuals - Convention Spend])&lt;/P&gt;
&lt;P&gt;Then one for&lt;/P&gt;
&lt;P&gt;Count of Distinct Sites = DISTINCTCOUNT('YourTableName'[Site Number])&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And last for average&lt;/P&gt;
&lt;P&gt;Average Spend per Site = [Total Spend] / [Count of Distinct Sites]&lt;/P&gt;</description>
      <pubDate>Tue, 02 Sep 2025 05:41:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compute-Average-Cost-in-Power-BI-Total-Actuals-Count-D-Sites/m-p/4814016#M184108</guid>
      <dc:creator>bhanu_gautam</dc:creator>
      <dc:date>2025-09-02T05:41:01Z</dc:date>
    </item>
    <item>
      <title>Re: Compute Average Cost in Power BI (Total Actuals / Count D Sites)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compute-Average-Cost-in-Power-BI-Total-Actuals-Count-D-Sites/m-p/4814403#M184109</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1347345" data-lia-user-login="A22MATIC" class="lia-mention lia-mention-user"&gt;A22MATIC&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Please use below code for your measure&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Average Acts by Total Sites = 
VAR _Numerator = SUM( 'Table'[Total Actuals - Convention Spend] )
VAR _Denominator = 
CALCULATE(
    DISTINCTCOUNT( 'Table'[Site Number]), ALL()
)
VAR _Result = 
DIVIDE(_Numerator,_Denominator,0)
RETURN
_Result&lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;below screenshot&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Attached pbix file for your reference&lt;BR /&gt;&lt;BR /&gt;Hope it hleps&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;P&gt;sanalytics&lt;/P&gt;</description>
      <pubDate>Tue, 02 Sep 2025 10:05:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compute-Average-Cost-in-Power-BI-Total-Actuals-Count-D-Sites/m-p/4814403#M184109</guid>
      <dc:creator>sanalytics</dc:creator>
      <dc:date>2025-09-02T10:05:13Z</dc:date>
    </item>
    <item>
      <title>Re: Compute Average Cost in Power BI (Total Actuals / Count D Sites)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compute-Average-Cost-in-Power-BI-Total-Actuals-Count-D-Sites/m-p/4814665#M184110</link>
      <description>&lt;P&gt;Hello, Thanks for the response.&lt;BR /&gt;&lt;BR /&gt;Unfortunately, that did not work. I've tried to include all the screenshots below. I thought maybe it's the data format (General vs. Whole Number). Not sure why it's not working. I don't see a way to attach the Power BI file, but if there's a way, please let me know.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Sep 2025 13:21:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compute-Average-Cost-in-Power-BI-Total-Actuals-Count-D-Sites/m-p/4814665#M184110</guid>
      <dc:creator>A22MATIC</dc:creator>
      <dc:date>2025-09-02T13:21:39Z</dc:date>
    </item>
    <item>
      <title>Re: Compute Average Cost in Power BI (Total Actuals / Count D Sites)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compute-Average-Cost-in-Power-BI-Total-Actuals-Count-D-Sites/m-p/4814684#M184111</link>
      <description>&lt;P&gt;Hello, Thanks for the response.&lt;BR /&gt;&lt;BR /&gt;Unfortunately, that did not work.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Sep 2025 13:30:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compute-Average-Cost-in-Power-BI-Total-Actuals-Count-D-Sites/m-p/4814684#M184111</guid>
      <dc:creator>A22MATIC</dc:creator>
      <dc:date>2025-09-02T13:30:52Z</dc:date>
    </item>
    <item>
      <title>Re: Compute Average Cost in Power BI (Total Actuals / Count D Sites)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compute-Average-Cost-in-Power-BI-Total-Actuals-Count-D-Sites/m-p/4814739#M184112</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1347345" data-lia-user-login="A22MATIC" class="lia-mention lia-mention-user"&gt;A22MATIC&lt;/a&gt;&amp;nbsp;Please share some dummy data along with your Power BI model. It will help us to work on..&lt;BR /&gt;&lt;BR /&gt;Regards&lt;/P&gt;
&lt;P&gt;sanalytics&lt;/P&gt;</description>
      <pubDate>Tue, 02 Sep 2025 13:56:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compute-Average-Cost-in-Power-BI-Total-Actuals-Count-D-Sites/m-p/4814739#M184112</guid>
      <dc:creator>sanalytics</dc:creator>
      <dc:date>2025-09-02T13:56:29Z</dc:date>
    </item>
    <item>
      <title>Re: Compute Average Cost in Power BI (Total Actuals / Count D Sites)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compute-Average-Cost-in-Power-BI-Total-Actuals-Count-D-Sites/m-p/4814781#M184113</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1347345" data-lia-user-login="A22MATIC" class="lia-mention lia-mention-user"&gt;A22MATIC&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;why are you saying it's not working?&lt;BR /&gt;Sum of ACTS = 27637816&lt;/P&gt;
&lt;P&gt;Number of sites= 250&lt;/P&gt;
&lt;P&gt;Average= 27637816/250=110551&lt;BR /&gt;&lt;BR /&gt;Do you want to display the same average in all the rows? Regardless of the site in the current row?&lt;/P&gt;</description>
      <pubDate>Tue, 02 Sep 2025 14:43:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compute-Average-Cost-in-Power-BI-Total-Actuals-Count-D-Sites/m-p/4814781#M184113</guid>
      <dc:creator>Gabry</dc:creator>
      <dc:date>2025-09-02T14:43:28Z</dc:date>
    </item>
    <item>
      <title>Re: Compute Average Cost in Power BI (Total Actuals / Count D Sites)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compute-Average-Cost-in-Power-BI-Total-Actuals-Count-D-Sites/m-p/4814902#M184116</link>
      <description>&lt;P&gt;Thanks. I see the issue. You are correct. The formula works. Do you know how to make it work with a slicer? My end users will filter on their Project, and will need to see the averages that way.&lt;BR /&gt;&lt;BR /&gt;Your formula works, but I have a slicer, and when it's selected, the Average for Count D isn't working. I'm struggling trying to attach the Power BI file. Can you please let me know how I can do that?&lt;/P&gt;</description>
      <pubDate>Tue, 02 Sep 2025 16:50:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compute-Average-Cost-in-Power-BI-Total-Actuals-Count-D-Sites/m-p/4814902#M184116</guid>
      <dc:creator>A22MATIC</dc:creator>
      <dc:date>2025-09-02T16:50:01Z</dc:date>
    </item>
    <item>
      <title>Re: Compute Average Cost in Power BI (Total Actuals / Count D Sites)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compute-Average-Cost-in-Power-BI-Total-Actuals-Count-D-Sites/m-p/4814904#M184117</link>
      <description>&lt;P&gt;You are correct. The formula works. Do you know how to make it work with a slicer? My end users will filter on their Project, and will need to see the averages that way.&lt;BR /&gt;&lt;BR /&gt;The issue is I have a slicer, and when it's selected, the Average for Count D isn't working. I'm struggling trying to attach the Power BI file. Can you please let me know how I can do that?&lt;/P&gt;</description>
      <pubDate>Tue, 02 Sep 2025 16:49:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compute-Average-Cost-in-Power-BI-Total-Actuals-Count-D-Sites/m-p/4814904#M184117</guid>
      <dc:creator>A22MATIC</dc:creator>
      <dc:date>2025-09-02T16:49:28Z</dc:date>
    </item>
    <item>
      <title>Re: Compute Average Cost in Power BI (Total Actuals / Count D Sites)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compute-Average-Cost-in-Power-BI-Total-Actuals-Count-D-Sites/m-p/4814916#M184118</link>
      <description>&lt;P&gt;&lt;A title="Dropbox Power BI file" href="https://www.dropbox.com/scl/fi/9pix5togyml5be55opju6/Average-Cost-issue.pbix?rlkey=i6zcyniliemhyfej6d0twmfpu&amp;amp;st=sxmfwvls&amp;amp;dl=0" target="_self"&gt;Dropbox Power BI file&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Sep 2025 17:06:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compute-Average-Cost-in-Power-BI-Total-Actuals-Count-D-Sites/m-p/4814916#M184118</guid>
      <dc:creator>A22MATIC</dc:creator>
      <dc:date>2025-09-02T17:06:26Z</dc:date>
    </item>
    <item>
      <title>Re: Compute Average Cost in Power BI (Total Actuals / Count D Sites)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compute-Average-Cost-in-Power-BI-Total-Actuals-Count-D-Sites/m-p/4814917#M184119</link>
      <description>&lt;P&gt;&lt;A title="Dropbox Power BI file" href="https://www.dropbox.com/scl/fi/9pix5togyml5be55opju6/Average-Cost-issue.pbix?rlkey=i6zcyniliemhyfej6d0twmfpu&amp;amp;st=sxmfwvls&amp;amp;dl=0" target="_self"&gt;Dropbox Power BI file&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Sep 2025 17:07:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compute-Average-Cost-in-Power-BI-Total-Actuals-Count-D-Sites/m-p/4814917#M184119</guid>
      <dc:creator>A22MATIC</dc:creator>
      <dc:date>2025-09-02T17:07:07Z</dc:date>
    </item>
    <item>
      <title>Re: Compute Average Cost in Power BI (Total Actuals / Count D Sites)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compute-Average-Cost-in-Power-BI-Total-Actuals-Count-D-Sites/m-p/4814947#M184120</link>
      <description>&lt;P data-start="129" data-end="420"&gt;I looked at the file, but I don’t quite understand what you want to do. If you use the filter in the top right corner of the canvas, it calculates the average for the selected project, right? Are you asking for the overall average regardless of the project selected?&lt;/P&gt;
&lt;P data-start="422" data-end="473"&gt;You can achieve this with the following formulas:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Average Acts by Total Sites = 
VAR _Numerator = CALCULATE(SUM( 'Table112'[Actuals] ), ALL(Table112[Proj Def &amp;amp; Name]))
VAR _Denominator = 
CALCULATE(
    DISTINCTCOUNT( 'Table112'[Site]), ALL()
)
VAR _Result = 
DIVIDE(_Numerator,_Denominator,0)
RETURN
_Result&lt;/LI-CODE&gt;
&lt;P&gt;Or&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Average Acts by Total Sites = 
VAR _Numerator = CALCULATE(SUM( 'Table112'[Actuals] ), ALL(Table112))
VAR _Denominator = 
CALCULATE(
    DISTINCTCOUNT( 'Table112'[Site]), ALL()
)
VAR _Result = 
DIVIDE(_Numerator,_Denominator,0)
RETURN
_Result&lt;/LI-CODE&gt;
&lt;P&gt;Oh I think maybe I understood what you want to do, try this and let me know:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Average Acts by Total Sites = 
VAR _Numerator = SUM( 'Table112'[Actuals] )
VAR _Denominator = 
CALCULATE(
    DISTINCTCOUNT( 'Table112'[Site]), ALLSELECTED()
)
VAR _Result = 
DIVIDE(_Numerator,_Denominator,0)
RETURN
_Result&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 02 Sep 2025 18:06:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compute-Average-Cost-in-Power-BI-Total-Actuals-Count-D-Sites/m-p/4814947#M184120</guid>
      <dc:creator>Gabry</dc:creator>
      <dc:date>2025-09-02T18:06:52Z</dc:date>
    </item>
    <item>
      <title>Re: Compute Average Cost in Power BI (Total Actuals / Count D Sites)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compute-Average-Cost-in-Power-BI-Total-Actuals-Count-D-Sites/m-p/4814950#M184121</link>
      <description>&lt;P&gt;YES!! That is precisely what I'm trying to do!!&lt;BR /&gt;&lt;BR /&gt;So sorry it took so long, and thank you for your patience with this newcomer!&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;Average Acts by Total Sites = 
VAR _Numerator = SUM( 'Table112'[Actuals] )
VAR _Denominator = 
CALCULATE(
    DISTINCTCOUNT( 'Table112'[Site]), ALLSELECTED()
)
VAR _Result = 
DIVIDE(_Numerator,_Denominator,0)
RETURN
_Result&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Sep 2025 18:19:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compute-Average-Cost-in-Power-BI-Total-Actuals-Count-D-Sites/m-p/4814950#M184121</guid>
      <dc:creator>A22MATIC</dc:creator>
      <dc:date>2025-09-02T18:19:29Z</dc:date>
    </item>
  </channel>
</rss>

