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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
ranjitsingh
Advocate I
Advocate I

Clustered Bar Chart and Median Line

Hi,

 

I have a clustered bar chart showing salary as value and employee on the axis. I want to create a reference line to show employees that are above the median salary. Can I use the salary measure to create a median line ? For eg MEDIAN(Employee_Table[Salary]). 

 

1 ACCEPTED SOLUTION
v-eqin-msft
Community Support
Community Support

Hi @ranjitsingh ,

 

Yes, I agree with you. Adding a median/average line and so on  in the Analysis pane is the easiest and most effective way.

 

Please kindly Accept your reply as the solution to make the thread closed. More people will benefit from it.

 

Best Regards,
Eyelyn Qin

View solution in original post

3 REPLIES 3
v-eqin-msft
Community Support
Community Support

Hi @ranjitsingh ,

 

Yes, I agree with you. Adding a median/average line and so on  in the Analysis pane is the easiest and most effective way.

 

Please kindly Accept your reply as the solution to make the thread closed. More people will benefit from it.

 

Best Regards,
Eyelyn Qin

ranjitsingh
Advocate I
Advocate I

Actually I realized I didnt need to create a DAX measure. I used Analytics pane to get my line.

mahoneypat
Employee
Employee

If you have a single row for each employee and the Value column has the salary for each employee, you can use an expression like this.

 

Median Salary = MEDIANX(ALL(Employee_Table), Employee_Table[Value])

 

Pat

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.