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

The FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now

Reply
CJ_96601
Helper V
Helper V

calculate the median from an exising measure

Good morning, 

 

i have an existing measure, called "Leavers" and i would like to calculate the average tenure ( field name from the same table is (YOS).

 

Avg Tenure = 

([Leavers]),

calculate(median('table name'([YOS])+0))

 

Can someone help me to fix above dax.

 

Thanks

 

 

Thanks

5 REPLIES 5
Anonymous
Not applicable

Hi @CJ_96601 ,

 

Can you let me know if your problem has been resolved? If yes, please share your solution in order to help more people with the same problem, if not share your sample input data (please be careful to protect private data) and expected output results.

 

The MEDIAN function only supports columns and not measures. If you want to get the median of a YOS column, then you can create the following measure:

Median = Median('table name'([YOS]))


If you want to get the mean of that YOS column, you can use the AVERAGE() function.

AVERAGE - DAX Guide

 

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

Ashish_Mathur
Super User
Super User

Hi,

We may be able to do this with an AVERAGEX().  To receive further help, share some data, explain the question and show the expected result.  Share data in a format that can be pasted in an MS Excel file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
lbendlin
Super User
Super User

You cannot measure a measure directly. Either materialize it first, or create a separate measure that implements the entire business logic.

Thanks

 

Ritaf1983
Super User
Super User

Hi @CJ_96601 

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
Please show the expected outcome based on the sample data you provided.

Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.