Truncated mean provides a more robust measure of average by excluding a specified percentage of the smallest and largest values from the calculation. Modern PowerTruncated mean provides a more robust measure of average by excluding a specified percentage of the smallest and largest values from the calculation. Modern Power

Calculating a Dynamic Truncated Mean in Power BI Using DAX: A Quick Guide

Why You Need a Truncated Mean

In data analysis, the standard AVERAGE function is a workhorse, but it has a significant weakness: it is highly susceptible to distortion from outliers. A single extreme value, whether high or low, can skew the entire result, misrepresenting the data's true central tendency.

\ This is where the truncated mean becomes essential. It provides a more robust measure of the average by excluding a specified percentage of the smallest and largest values from the calculation.

\ While modern Power BI models have a built-in TRIMMEAN function, this function is often unavailable when using a Live Connection to an older Analysis Services (SSAS) model. This article provides a robust, manual DAX pattern that replicates this functionality and remains fully dynamic, responding to all slicers and filters in your report.

The DAX Solution for a Dynamic Truncated Mean

This measure calculates a 20% truncated mean by removing the bottom 10% and top 10% of values before averaging the remaining 80%.

\ You can paste this code directly into the "New Measure" formula bar.

Trimmed Mean (20%) = VAR TargetTable = 'FactTable' VAR TargetColumn = 'FactTable'[MeasureColumn] VAR LowerPercentile = 0.10 // Defines the bottom 10% to trim VAR UpperPercentile = 0.90 // Defines the top 10% to trim (1.0 - 0.10) // 1. Find the value at the 10th percentile VAR MinThreshold = PERCENTILEX.INC( FILTER( TargetTable, NOT( ISBLANK( TargetColumn ) ) ), TargetColumn, LowerPercentile ) // 2. Find the value at the 90th percentile VAR MaxThreshold = PERCENTILEX.INC( FILTER( TargetTable, NOT( ISBLANK( TargetColumn ) ) ), TargetColumn, UpperPercentile ) // 3. Calculate the average, including only values between the thresholds RETURN CALCULATE( AVERAGEX( FILTER( TargetTable, TargetColumn >= MinThreshold && TargetColumn <= MaxThreshold ), TargetColumn ) )

Deconstructing the DAX Logic

This formula works in three distinct steps, all of which execute within the current filter context (e.g., whatever slicers the user has selected).

  1. Define Key Variables
  • TargetTable & TargetColumn: We assign the table and column names to variables for clean, reusable code. You must change 'FactTable'[MeasureColumn] to match your data model.
  • LowerPercentile / UpperPercentile: We define the boundaries. 0.10 and 0.90 mean we are trimming the bottom 10% and top 10%. To trim 5% from each end (a 10% total trim), you would use 0.05 and 0.95.

2. Find the Percentile Thresholds

  • MinThreshold & MaxThreshold: These variables store the actual values that correspond to our percentile boundaries.
  • PERCENTILEX.INC: We use this "iterator" function because it allows us to first FILTER the table.
  • `FILTER(…, NOT(ISBLANK(…))): This is a crucial step. We calculate the percentiles only for rows where our target column is not blank. This prevents BLANK() values from skewing the percentile calculation.
  • The result is that MinThreshold holds the value of the 10th percentile (e.g., 4.5) and MaxThreshold holds the value of the 90th percentile (e.g., 88.2) for the currently visible data.

3. Calculate the Final Average

  • RETURN CALCULATE(...): The CALCULATE function is the key to making the measure dynamic. It ensures the entire calculation respects the filters applied by any slicers or visuals in the report.
  • AVERAGEX(FILTER(...)): The core of the calculation. We use AVERAGEX to iterate over a table.
  • FILTER(...): We filter our TargetTable a final time. This filter is the "trim." It keeps only the rows where the value in TargetColumn is:
  • Greater than or equal to our MinThreshold
  • AND
  • Less than or equal to our MaxThreshold
  • AVERAGEX(..., TargetColumn): AVERAGEX then calculates the simple average of TargetColumn for only the rows that passed the filter.

Conclusion

By implementing this DAX pattern, you create a robust, dynamic, and outlier-resistant KPI. This measure provides a more accurate picture of your data's central tendency and will correctly re-calculate on the fly as users interact with your Power BI report.


Thank you for taking the time to explore data-related insights with me. I appreciate your engagement. If you find this information helpful, I invite you to follow me or connect with me on LinkedIn or X(@Luca_DataTeam). Happy exploring!👋

Market Opportunity
Power Protocol Logo
Power Protocol Price(POWER)
$0.1585
$0.1585$0.1585
+10.10%
USD
Power Protocol (POWER) Live Price Chart
Disclaimer: The articles reposted on this site are sourced from public platforms and are provided for informational purposes only. They do not necessarily reflect the views of MEXC. All rights remain with the original authors. If you believe any content infringes on third-party rights, please contact service@support.mexc.com for removal. MEXC makes no guarantees regarding the accuracy, completeness, or timeliness of the content and is not responsible for any actions taken based on the information provided. The content does not constitute financial, legal, or other professional advice, nor should it be considered a recommendation or endorsement by MEXC.

You May Also Like

Franklin Templeton CEO Dismisses 50bps Rate Cut Ahead FOMC

Franklin Templeton CEO Dismisses 50bps Rate Cut Ahead FOMC

The post Franklin Templeton CEO Dismisses 50bps Rate Cut Ahead FOMC appeared on BitcoinEthereumNews.com. Franklin Templeton CEO Jenny Johnson has weighed in on whether the Federal Reserve should make a 25 basis points (bps) Fed rate cut or 50 bps cut. This comes ahead of the Fed decision today at today’s FOMC meeting, with the market pricing in a 25 bps cut. Bitcoin and the broader crypto market are currently trading flat ahead of the rate cut decision. Franklin Templeton CEO Weighs In On Potential FOMC Decision In a CNBC interview, Jenny Johnson said that she expects the Fed to make a 25 bps cut today instead of a 50 bps cut. She acknowledged the jobs data, which suggested that the labor market is weakening. However, she noted that this data is backward-looking, indicating that it doesn’t show the current state of the economy. She alluded to the wage growth, which she remarked is an indication of a robust labor market. She added that retail sales are up and that consumers are still spending, despite inflation being sticky at 3%, which makes a case for why the FOMC should opt against a 50-basis-point Fed rate cut. In line with this, the Franklin Templeton CEO said that she would go with a 25 bps rate cut if she were Jerome Powell. She remarked that the Fed still has the October and December FOMC meetings to make further cuts if the incoming data warrants it. Johnson also asserted that the data show a robust economy. However, she noted that there can’t be an argument for no Fed rate cut since Powell already signaled at Jackson Hole that they were likely to lower interest rates at this meeting due to concerns over a weakening labor market. Notably, her comment comes as experts argue for both sides on why the Fed should make a 25 bps cut or…
Share
BitcoinEthereumNews2025/09/18 00:36
Why Is Crypto Up Today? – January 13, 2026

Why Is Crypto Up Today? – January 13, 2026

The crypto market is trading slightly higher today, with total cryptocurrency market capitalization rising by around 1.7% over the past 24 hours to approximately
Share
CryptoNews2026/01/13 22:26
BTC Leverage Builds Near $120K, Big Test Ahead

BTC Leverage Builds Near $120K, Big Test Ahead

The post BTC Leverage Builds Near $120K, Big Test Ahead appeared on BitcoinEthereumNews.com. Key Insights: Heavy leverage builds at $118K–$120K, turning the zone into Bitcoin’s next critical resistance test. Rejection from point of interest with delta divergences suggests cooling momentum after the recent FOMC-driven spike. Support levels at $114K–$115K may attract buyers if BTC fails to break above $120K. BTC Leverage Builds Near $120K, Big Test Ahead Bitcoin was trading around $117,099, with daily volume close to $59.1 billion. The price has seen a marginal 0.01% gain over the past 24 hours and a 2% rise in the past week. Data shared by Killa points to heavy leverage building between $118,000 and $120,000. Heatmap charts back this up, showing dense liquidity bands in that zone. Such clusters of orders often act as magnets for price action, as markets tend to move where liquidity is stacked. Price Action Around the POI Analysis from JoelXBT highlights how Bitcoin tapped into a key point of interest (POI) during the recent FOMC-driven spike. This move coincided with what was called the “zone of max delta pain”, a level where aggressive volume left imbalances in order flow. Source: JoelXBT /X Following the test of this area, BTC faced rejection and began to pull back. Delta indicators revealed extended divergences, with price rising while buyer strength weakened. That mismatch suggests demand failed to keep up with the pace of the rally, leaving room for short-term cooling. Resistance and Support Levels The $118K–$120K range now stands as a major resistance band. A clean move through $120K could force leveraged shorts to cover, potentially driving further upside. On the downside, smaller liquidity clusters are visible near $114K–$115K. If rejection holds at the top, these levels are likely to act as the first supports where buyers may attempt to step in. Market Outlook Bitcoin’s next decisive move will likely form around the…
Share
BitcoinEthereumNews2025/09/18 16:40