Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
PetrK
Helper II
Helper II

Display median value in column chart

Hi,

I have this file Median in chart.pbix with sample data and easy visualizasation. Data contain list of projects and their delay. 
And I want dispaly median and average avlue of project delay it the bar chart. I can be done by different color of column which is on position of median value or display some symbol/object above columns.
At the picture is scratched how it could looks like.
Can somebody help me with this task please? 

PetrK_0-1713777874066.png

 

2 REPLIES 2
johnbasha33
Solution Sage
Solution Sage

@PetrK 

To display the median and average values of project delay in the bar chart, you can follow these steps in Power BI:

1. **Calculate Median and Average**: First, you need to calculate the median and average values of project delay. You can do this using DAX measures. Here's how you can calculate them:

```DAX
Median Delay = MEDIAN('YourTable'[Delay])

Average Delay = AVERAGE('YourTable'[Delay])
```

Replace `'YourTable'` with the actual name of your table and `'Delay'` with the name of your delay column.

2. **Create Bar Chart**: Create a bar chart visual in Power BI and add your project names to the Axis and project delays to the Values section.

3. **Add Median and Average Lines**: To add median and average lines to the chart, follow these steps:

a. Go to the formatting options of the bar chart visual.

b. Navigate to the "Data colors" section.

c. Click on the "+" button to add a new rule.

d. Choose "Median Delay" from the dropdown menu.

e. Set the color to differentiate the median line from the other bars.

f. Repeat steps c to e for the "Average Delay".

This will add median and average lines to your bar chart, making it easy to visualize these values alongside your project delays. You can customize the appearance of these lines to make them stand out, such as using different colors or line styles.

Did I answer your question? Mark my post as a solution! Appreciate your Kudos !!

this doesn't solve my problem, I need chart with delay value in x-axis as is on picture and in file.

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.