Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
I have a direct query from Power BI Desktop to SQL Server. The table will be updated every day increasing the row number.
Below an example of raw data:
Original Raw Data
Now I need to measure the AVERAGE skipping the first 5% of row count and last 5% of row count (20 rows in this example * 5 divided by 100).
Rows = CALCULATE( DISTINCTCOUNT( 'tableBus'[ID] ) * 5 / 100 )So, this DAX give ne the number of rows that I need to skip in the beginning and in the end of table, in this example 1 line due the total count rows equal 20. Besides skip the first 5% and last 5% of lines, I need to sort the column values to calculate the AVERAGE:
In this example the average (in seconds) is 853, between value 3 and value 2447. Do you have any idea how I can get this in DAX using a Calculated Measure?
Solved! Go to Solution.
Why do you need to sort the columns to calculate the average ? won't it be the same no matter what the order ?
Help when you know. Ask when you don't!
This is a business rule, if I skip only the first 5% and last 5% I can calculate an outlier in the AVERAGE. Because of this, I need to follow this requirement to remove first 5% of min values and last 5% of max values.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 7 | |
| 6 | |
| 5 | |
| 4 |
| User | Count |
|---|---|
| 24 | |
| 11 | |
| 11 | |
| 9 | |
| 8 |