<?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: Showing incorrect avg sum ? in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Showing-incorrect-avg-sum/m-p/4813482#M184055</link>
    <description>&lt;P&gt;For the data labels, use this measure showing the lables of it (you might need to add this measure to the chart)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Total Sum of Avg =
SUMX (
    VALUES ( Fact[cycletime_nm] ),
    [Your Measure For Average]
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this helped, please consider giving kudos and mark as a solution&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="273" data-lia-user-login="me" class="lia-mention lia-mention-user"&gt;me&lt;/a&gt; in replies or I'll lose your thread&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Want to check your DAX skills? &lt;A href="https://www.linkedin.com/company/kubisco/" target="_blank"&gt;Answer my biweekly DAX challenges on the kubisco Linkedin page&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Consider voting &lt;A href="https://community.fabric.microsoft.com/t5/Fabric-Ideas/Power-BI-Filter-Pane-as-an-icon-on-the-right-side-bar-in-on/idi-p/4728588" target="_blank"&gt;this Power BI idea&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Francesco Bergamaschi&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;MBA, M.Eng, M.Econ, Professor of BI&lt;/P&gt;</description>
    <pubDate>Mon, 01 Sep 2025 12:07:38 GMT</pubDate>
    <dc:creator>FBergamaschi</dc:creator>
    <dc:date>2025-09-01T12:07:38Z</dc:date>
    <item>
      <title>Showing incorrect avg sum ?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Showing-incorrect-avg-sum/m-p/4813366#M184049</link>
      <description>&lt;P&gt;Hii&lt;BR /&gt;&lt;BR /&gt;I am facing a critical issue in Power BI related to the Stacked Column Chart total data labels. I have a Stacked Column Chart where I want to display the sum of average durations of CycleTime (cycletime_nm) on top of the bar. The bar height should reflect the average, but the label on top of the bar should show the sum of selected cycle times. The issue is that: When I select a single cycletime_nm, the total label shows correct values. When I multi-select a few cycle times, it sums correctly and displays the accurate total label. But when no filter is applied (i.e., default view, all cycle times selected), the bar total label shows incorrect/inflated values.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Sep 2025 10:34:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Showing-incorrect-avg-sum/m-p/4813366#M184049</guid>
      <dc:creator>malhotra6675</dc:creator>
      <dc:date>2025-09-01T10:34:56Z</dc:date>
    </item>
    <item>
      <title>Re: Showing incorrect avg sum ?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Showing-incorrect-avg-sum/m-p/4813387#M184050</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1328242" data-lia-user-login="malhotra6675" class="lia-mention lia-mention-user"&gt;malhotra6675&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P data-start="189" data-end="413"&gt;This is a limitation of stacked column charts in Power BI. The total label on top is just the sum of the bar segments, so when the bar itself is showing an average, the total becomes inflated if all categories are visible.&lt;/P&gt;
&lt;P data-start="415" data-end="526"&gt;To fix this, you need a separate measure for the total instead of relying on the built-in label. For example:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Avg CycleTime =
AVERAGE ( Fact[CycleTime] )&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Total Sum of Avg =
SUMX (
    VALUES ( Fact[cycletime_nm] ),
    CALCULATE ( [Avg CycleTime] )
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI data-start="682" data-end="727"&gt;
&lt;P data-start="684" data-end="727"&gt;Use [Avg CycleTime] for the bar height.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI data-start="728" data-end="815"&gt;
&lt;P data-start="730" data-end="815"&gt;Add [Total Sum of Avg] as a line in a combo chart and show its data label on top.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI data-start="816" data-end="962"&gt;
&lt;P data-start="818" data-end="962"&gt;This way, the bar still shows the average, but the label always shows the correct sum of selected cycle times, even when no filter is applied.&lt;/P&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Sep 2025 10:55:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Showing-incorrect-avg-sum/m-p/4813387#M184050</guid>
      <dc:creator>rohit1991</dc:creator>
      <dc:date>2025-09-01T10:55:59Z</dc:date>
    </item>
    <item>
      <title>Re: Showing incorrect avg sum ?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Showing-incorrect-avg-sum/m-p/4813462#M184054</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1328242" data-lia-user-login="malhotra6675" class="lia-mention lia-mention-user"&gt;malhotra6675&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thank you for reaching out to the Microsoft Community Forum.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="824538" data-lia-user-login="rohit1991" class="lia-mention lia-mention-user"&gt;rohit1991&lt;/a&gt;&amp;nbsp;, Thank you for your prompt response.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1328242" data-lia-user-login="malhotra6675" class="lia-mention lia-mention-user"&gt;malhotra6675&lt;/a&gt;&amp;nbsp;,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;The bar height is based on AVERAGE(), but the total label in stacked visuals is the SUM() of segment values, which is bot equal to logical "sum of averages". You need to divide the logic for the bar height and the total label.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Measure for Bar height:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;AvgCycleTime =&lt;/P&gt;
&lt;P&gt;AVERAGEX(&lt;BR /&gt;VALUES(Table[CycleTime_nm]),&lt;BR /&gt;AVERAGE(Table[Duration])&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Measure for Total Label:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SumOfAvgCycleTime=&lt;BR /&gt;SUMX (&lt;BR /&gt;VALUES ( Table[CycleTime_nm] ),&lt;BR /&gt;CALCULATE ( AVERAGE(Table[Duration]) )&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In stacked column chart, drag AvgCycleTime and place SumOfAvgCycleTime in data label.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this information helps. Please do let us know if you have any further queries.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Dinesh&lt;/P&gt;</description>
      <pubDate>Mon, 01 Sep 2025 11:51:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Showing-incorrect-avg-sum/m-p/4813462#M184054</guid>
      <dc:creator>v-dineshya</dc:creator>
      <dc:date>2025-09-01T11:51:16Z</dc:date>
    </item>
    <item>
      <title>Re: Showing incorrect avg sum ?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Showing-incorrect-avg-sum/m-p/4813482#M184055</link>
      <description>&lt;P&gt;For the data labels, use this measure showing the lables of it (you might need to add this measure to the chart)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Total Sum of Avg =
SUMX (
    VALUES ( Fact[cycletime_nm] ),
    [Your Measure For Average]
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this helped, please consider giving kudos and mark as a solution&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="273" data-lia-user-login="me" class="lia-mention lia-mention-user"&gt;me&lt;/a&gt; in replies or I'll lose your thread&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Want to check your DAX skills? &lt;A href="https://www.linkedin.com/company/kubisco/" target="_blank"&gt;Answer my biweekly DAX challenges on the kubisco Linkedin page&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Consider voting &lt;A href="https://community.fabric.microsoft.com/t5/Fabric-Ideas/Power-BI-Filter-Pane-as-an-icon-on-the-right-side-bar-in-on/idi-p/4728588" target="_blank"&gt;this Power BI idea&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Francesco Bergamaschi&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;MBA, M.Eng, M.Econ, Professor of BI&lt;/P&gt;</description>
      <pubDate>Mon, 01 Sep 2025 12:07:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Showing-incorrect-avg-sum/m-p/4813482#M184055</guid>
      <dc:creator>FBergamaschi</dc:creator>
      <dc:date>2025-09-01T12:07:38Z</dc:date>
    </item>
  </channel>
</rss>

