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

Don'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.

Reply
Sharma0815
Helper II
Helper II

How to add median line using measure on line and clustered column chart

"I have case file data with interactions, and I am trying to create a histogram distribution of cases based on the number of interactions. I have grouped the number of interactions into bins. For example, the histogram shows 8 cases with 1 to 5 interactions and 4 cases with 10 to 15 interactions. I have already created a histogram using a line and clustered column chart, and now I am attempting to add a median line that represents the median of the interactions [1, 2, 15, 3, 2, 12, 5, 12, 10, 5, 6, 5, 4] is 5.5 

Here is the chart I created using my real data 

I would greatly appreciate any assistance.

Sharma0815_0-1675873849982.png

 Sample data

 

CaseInteractionsDateGroup
45632        12/8/2023Sales
68795        22/8/2023Campaign
34522       152/8/2023Campaign
34223         32/6/2023Campaign
45233         22/6/2023Campaign
44452        122/6/2023Marketing
45323         52/3/2023Marketing
43424        122/3/2023Marketing
44532        102/3/2023Marketing
55532         52/3/2023IT
42345          62/4/2023IT
22331         52/4/2024IT
44214         42/4/2023IT

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Sharma0815 , based on what I got

 

MedianX(Table, Table[Iteractions])

 

Use this in bar visual using analytics pane -> constant line - Fx  option

 

or

 

Use this measure as line in combo visual

 

MedianX(allselected(Table), Table[Iteractions])

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
Sharma0815
Helper II
Helper II

It's working Thanks @amitchandak 

amitchandak
Super User
Super User

@Sharma0815 , based on what I got

 

MedianX(Table, Table[Iteractions])

 

Use this in bar visual using analytics pane -> constant line - Fx  option

 

or

 

Use this measure as line in combo visual

 

MedianX(allselected(Table), Table[Iteractions])

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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