<?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 and display averages in a bar graph in power bi in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-and-display-averages-in-a-bar-graph-in-power-bi/m-p/3608692#M139469</link>
    <description>&lt;P&gt;Certainly! Displaying an average line on a bar graph in Power BI involves a combination of measures and visual adjustments. Here's a step-by-step guide to help you achieve this:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Create Your Data Model&lt;/STRONG&gt;: Ensure that your data model is correctly set up in Power BI with the necessary tables and relationships.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Create a New Measure for Average&lt;/STRONG&gt;: You mentioned you've created a new measure using the AVERAGE function. Let's call this measure AverageValue. Ensure that this measure is correctly calculating the average for your dataset.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Create a New Table or Measure for Period&lt;/STRONG&gt;: To represent the 14th period as an average line, you might need to introduce a new table or measure that represents this period.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Use a Combo Chart&lt;/STRONG&gt;: Instead of just using a bar chart, you might want to consider using a combo chart (column + line chart) to show the bars for each of the 13 periods and the average line for the 14th period.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Add Average Line to the Combo Chart&lt;/STRONG&gt;:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Drag your AverageValue measure onto the Values field of your combo chart.&lt;/LI&gt;&lt;LI&gt;In the Visualizations pane, under the Combo chart options, ensure you have both the clustered column chart and line chart types selected.&lt;/LI&gt;&lt;LI&gt;For the AverageValue measure in the Values field, set its chart type to a line.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Adjust Axes and Scales&lt;/STRONG&gt;:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Make sure the axes are consistent so that the average line is easily visible against the bar chart.&lt;/LI&gt;&lt;LI&gt;Adjust the scales and formats as needed to ensure clarity.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Add Titles and Labels&lt;/STRONG&gt;:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Add appropriate titles to your visualizations.&lt;/LI&gt;&lt;LI&gt;Consider adding a data label to the average line to clearly display the average value for the 14th period.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Filtering and Interactivity&lt;/STRONG&gt;:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;If necessary, set up filters or slicers to allow users to interactively explore the data across different periods while still displaying the average line.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;By following these steps, you should be able to create a bar graph in Power BI that displays the average of your dataset over 13 periods as a 14th period average line. Remember, Power BI offers a lot of flexibility in terms of visualizations and calculations, so you might need to adjust based on your specific dataset and requirements.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If this post&amp;nbsp;helps, then please consider&amp;nbsp;Accepting it as the solution&amp;nbsp;to help the other members find it more quickly.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;In case there is still a problem, please feel free and explain your issue in detail,&amp;nbsp;It will be my pleasure to assist you in any way I can.&lt;/STRONG&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 31 Dec 2023 07:09:13 GMT</pubDate>
    <dc:creator>123abc</dc:creator>
    <dc:date>2023-12-31T07:09:13Z</dc:date>
    <item>
      <title>How to calculate and display averages in a bar graph in power bi</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-and-display-averages-in-a-bar-graph-in-power-bi/m-p/3607536#M139372</link>
      <description>&lt;P&gt;Hi there, I'm extremely new to Power BI and certainly new here...I was just wondering if you could help me out with something. I want to display the Average of a data set over 13 Periods on a bar graph in Power BI. I created a very simple New Measure using AVERAGE, calling the data set whose Average I want to display. However, I'm unable to drag this to the X Axis to display as a 14th Period showing the Average (like a grand total, but instead it's the grand average). How do I do it?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Dec 2023 17:40:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-and-display-averages-in-a-bar-graph-in-power-bi/m-p/3607536#M139372</guid>
      <dc:creator>AM103</dc:creator>
      <dc:date>2023-12-29T17:40:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate and display averages in a bar graph in power bi</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-and-display-averages-in-a-bar-graph-in-power-bi/m-p/3608692#M139469</link>
      <description>&lt;P&gt;Certainly! Displaying an average line on a bar graph in Power BI involves a combination of measures and visual adjustments. Here's a step-by-step guide to help you achieve this:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Create Your Data Model&lt;/STRONG&gt;: Ensure that your data model is correctly set up in Power BI with the necessary tables and relationships.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Create a New Measure for Average&lt;/STRONG&gt;: You mentioned you've created a new measure using the AVERAGE function. Let's call this measure AverageValue. Ensure that this measure is correctly calculating the average for your dataset.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Create a New Table or Measure for Period&lt;/STRONG&gt;: To represent the 14th period as an average line, you might need to introduce a new table or measure that represents this period.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Use a Combo Chart&lt;/STRONG&gt;: Instead of just using a bar chart, you might want to consider using a combo chart (column + line chart) to show the bars for each of the 13 periods and the average line for the 14th period.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Add Average Line to the Combo Chart&lt;/STRONG&gt;:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Drag your AverageValue measure onto the Values field of your combo chart.&lt;/LI&gt;&lt;LI&gt;In the Visualizations pane, under the Combo chart options, ensure you have both the clustered column chart and line chart types selected.&lt;/LI&gt;&lt;LI&gt;For the AverageValue measure in the Values field, set its chart type to a line.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Adjust Axes and Scales&lt;/STRONG&gt;:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Make sure the axes are consistent so that the average line is easily visible against the bar chart.&lt;/LI&gt;&lt;LI&gt;Adjust the scales and formats as needed to ensure clarity.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Add Titles and Labels&lt;/STRONG&gt;:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Add appropriate titles to your visualizations.&lt;/LI&gt;&lt;LI&gt;Consider adding a data label to the average line to clearly display the average value for the 14th period.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Filtering and Interactivity&lt;/STRONG&gt;:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;If necessary, set up filters or slicers to allow users to interactively explore the data across different periods while still displaying the average line.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;By following these steps, you should be able to create a bar graph in Power BI that displays the average of your dataset over 13 periods as a 14th period average line. Remember, Power BI offers a lot of flexibility in terms of visualizations and calculations, so you might need to adjust based on your specific dataset and requirements.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If this post&amp;nbsp;helps, then please consider&amp;nbsp;Accepting it as the solution&amp;nbsp;to help the other members find it more quickly.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;In case there is still a problem, please feel free and explain your issue in detail,&amp;nbsp;It will be my pleasure to assist you in any way I can.&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 31 Dec 2023 07:09:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-and-display-averages-in-a-bar-graph-in-power-bi/m-p/3608692#M139469</guid>
      <dc:creator>123abc</dc:creator>
      <dc:date>2023-12-31T07:09:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate and display averages in a bar graph in power bi</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-and-display-averages-in-a-bar-graph-in-power-bi/m-p/3609230#M139511</link>
      <description>&lt;P&gt;Hi&amp;nbsp; &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="667241" data-lia-user-login="AM103" class="lia-mention lia-mention-user"&gt;AM103&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I created some data:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here are the steps you can follow：&lt;/P&gt;
&lt;P&gt;1. Create calculated table.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Table 2 =
var _column1=
DISTINCT('True'[Period])
var _column2=
{14}
return
UNION(
    _column1,_column2)&lt;/LI-CODE&gt;
&lt;P&gt;2. Create measure.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure =
IF(
    MAX('Table 2'[Period])=14,
 AVERAGEX(ALLSELECTED('True'),[Value])
   ,
    AVERAGEX(
        FILTER(ALLSELECTED('True'),'True'[Period]=MAX('Table 2'[Period])),[Value]))&lt;/LI-CODE&gt;
&lt;P&gt;3.&amp;nbsp;Place the field in Visual.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;X-axis – Type – X-axis -- Categorical&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;4. Result:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Liu Yang&lt;/P&gt;
&lt;P&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;EM&gt;Accept it as the solution&lt;/EM&gt; to help the other members find it more quickly&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jan 2024 03:07:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-and-display-averages-in-a-bar-graph-in-power-bi/m-p/3609230#M139511</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-01-01T03:07:01Z</dc:date>
    </item>
  </channel>
</rss>

