Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
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?
Solved! Go to Solution.
Hi @AM103 ,
I created some data:
Here are the steps you can follow:
1. Create calculated table.
Table 2 =
var _column1=
DISTINCT('True'[Period])
var _column2=
{14}
return
UNION(
_column1,_column2)
2. Create measure.
Measure =
IF(
MAX('Table 2'[Period])=14,
AVERAGEX(ALLSELECTED('True'),[Value])
,
AVERAGEX(
FILTER(ALLSELECTED('True'),'True'[Period]=MAX('Table 2'[Period])),[Value]))
3. Place the field in Visual.
X-axis – Type – X-axis -- Categorical
4. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @AM103 ,
I created some data:
Here are the steps you can follow:
1. Create calculated table.
Table 2 =
var _column1=
DISTINCT('True'[Period])
var _column2=
{14}
return
UNION(
_column1,_column2)
2. Create measure.
Measure =
IF(
MAX('Table 2'[Period])=14,
AVERAGEX(ALLSELECTED('True'),[Value])
,
AVERAGEX(
FILTER(ALLSELECTED('True'),'True'[Period]=MAX('Table 2'[Period])),[Value]))
3. Place the field in Visual.
X-axis – Type – X-axis -- Categorical
4. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
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:
Create Your Data Model: Ensure that your data model is correctly set up in Power BI with the necessary tables and relationships.
Create a New Measure for Average: 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.
Create a New Table or Measure for Period: To represent the 14th period as an average line, you might need to introduce a new table or measure that represents this period.
Use a Combo Chart: 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.
Add Average Line to the Combo Chart:
Adjust Axes and Scales:
Add Titles and Labels:
Filtering and Interactivity:
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.
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.
In case there is still a problem, please feel free and explain your issue in detail, It will be my pleasure to assist you in any way I can.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
18 | |
15 | |
12 | |
10 | |
8 |
User | Count |
---|---|
24 | |
17 | |
11 | |
11 | |
10 |