Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Exclude greatest 5% of values from the data set (Avg. number of days) using a button click.
Example: 100 line items in the grid. Button is clicked to exclude the 5% greatest average no. of days(Cycle time) line items. I have created a DAX measure for this but not able to fix this. Below is my DAX expression. I have around 27,000 records in my dataset. It is not at all able to exclude top 5% of NSRs.
Solved! Go to Solution.
1. Calculate the Threshold for the Top 5% Values
Create a measure to determine the value that separates the top 5% of NSR Approval Cycle Time (Actual):
Top_5_Percent_Threshold =
VAR TotalCount = COUNTROWS('Global_NSR')
VAR Top5PercentCount = INT(TotalCount * 0.05)
RETURN
CALCULATE (
MAXX (
TOPN (
Top5PercentCount,
'Global_NSR',
'Global_NSR'[NSR Approval Cycle Time(Actual)],
DESC
),
'Global_NSR'[NSR Approval Cycle Time(Actual)]
)
)
2. Create a Calculated Table Excluding the Top 5% Values
Create a new calculated table that excludes the top 5% of values based on the calculated threshold:
Filtered_Global_NSR =
VAR Threshold = [Top_5_Percent_Threshold]
RETURN
FILTER (
'Global_NSR',
'Global_NSR'[NSR Approval Cycle Time(Actual)] <= Threshold
)
By creating this calculated table, you can then use it in your reports and visualizations to work with the dataset excluding the top 5% of NSR Approval Cycle Time (Actual) values.
Did I answer your question? If so, please mark my post as a solution!
Proud to be a Super User!
1. Calculate the Threshold for the Top 5% Values
Create a measure to determine the value that separates the top 5% of NSR Approval Cycle Time (Actual):
Top_5_Percent_Threshold =
VAR TotalCount = COUNTROWS('Global_NSR')
VAR Top5PercentCount = INT(TotalCount * 0.05)
RETURN
CALCULATE (
MAXX (
TOPN (
Top5PercentCount,
'Global_NSR',
'Global_NSR'[NSR Approval Cycle Time(Actual)],
DESC
),
'Global_NSR'[NSR Approval Cycle Time(Actual)]
)
)
2. Create a Calculated Table Excluding the Top 5% Values
Create a new calculated table that excludes the top 5% of values based on the calculated threshold:
Filtered_Global_NSR =
VAR Threshold = [Top_5_Percent_Threshold]
RETURN
FILTER (
'Global_NSR',
'Global_NSR'[NSR Approval Cycle Time(Actual)] <= Threshold
)
By creating this calculated table, you can then use it in your reports and visualizations to work with the dataset excluding the top 5% of NSR Approval Cycle Time (Actual) values.
Did I answer your question? If so, please mark my post as a solution!
Proud to be a Super User!