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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
HellRaizer2310
Frequent Visitor

Need help in creating custom new measure for median values

I have a data set with 4 columns. Column A = Company Name, Column B = Financial Year, Column C = Days of Working Capital and Column D = Industry Name.

I am trying to create a custom bar chart that shows the median days working capital for each industry for the financial year 2018. Can someone please help with a formula? 

 

Company NameFinancial YearDays Working CapitalIndustry
A20182Retail
A20175Retail
B20183Retail
B20176Retail
C20184Retail
C20177Retail
D20185Pharma
D20178Pharma
E20186Pharma
E20179Pharma
F20187Pharma
F201710Pharma
2 ACCEPTED SOLUTIONS
TrentS
Helper IV
Helper IV

Hi,

You can create the median with the function in Power BI. 

Median = MEDIAN('Table'[Days Working Capital])
Then it is just a matter of how you want your chart to appear.
Something like?
medianCapture.PNG
Lots of options on the display.
That help?
Trent

View solution in original post

v-diye-msft
Community Support
Community Support

Hi @HellRaizer2310 ,

 

Let me know if you'd like to get the result like this :

Median = CALCULATE(MEDIAN('Table'[Days Working Capital]),ALL('Table'),VALUES('Table'[Financial Year]),VALUES('Table'[Industry]))

002.PNG

Pbix attached here: https://wicren-my.sharepoint.com/:u:/g/personal/dinaye_wicren_onmicrosoft_com/EX0PmQRDUGdHq14Wlvq6gC...

 

 

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.

View solution in original post

2 REPLIES 2
v-diye-msft
Community Support
Community Support

Hi @HellRaizer2310 ,

 

Let me know if you'd like to get the result like this :

Median = CALCULATE(MEDIAN('Table'[Days Working Capital]),ALL('Table'),VALUES('Table'[Financial Year]),VALUES('Table'[Industry]))

002.PNG

Pbix attached here: https://wicren-my.sharepoint.com/:u:/g/personal/dinaye_wicren_onmicrosoft_com/EX0PmQRDUGdHq14Wlvq6gC...

 

 

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.
TrentS
Helper IV
Helper IV

Hi,

You can create the median with the function in Power BI. 

Median = MEDIAN('Table'[Days Working Capital])
Then it is just a matter of how you want your chart to appear.
Something like?
medianCapture.PNG
Lots of options on the display.
That help?
Trent

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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