How to Create a DAX Percentage Measure That Respects Slicers in Excel
Question details
The user needs to create a DAX measure for percentage calculations that dynamically totals 100% based on active slicers and filters, rather than calculating against the entire dataset.
- Product
- Microsoft Excel / Power BI
- Device & OS
- not provided
- Scenario
- Calculating accurate categorical percentages (such as ethnicity) based on dynamically filtered data via slicers.
- Observed behavior
- The percentage calculation needs to evaluate values only against the currently filtered context instead of unconditionally evaluating against all categories.
Ensure that your data model is correctly loaded into your workbook and that your slicers are properly connected to the relevant data tables.
Use the ALLSELECTED Function for Dynamic Denominators
Apply the ALLSELECTED function within a CALCULATE statement to ensure your percentage denominator dynamically respects active slicers.
The ALLSELECTED function removes context filters from columns and rows in the current query, while retaining all other context filters or explicit filters. This makes it the ideal DAX function for calculating percentages that need to total 100% based only on the filtered items.
Navigate to the Power Pivot tab in Excel or the Modeling tab in Power BI, and select 'New Measure'.
Input the following formula: Rating % = DIVIDE([Talent Rating ALL], CALCULATE([Talent Rating ALL], ALLSELECTED('Talent Rating'[Ethnicity grouped]))).
Save the measure. Instead of multiplying the formula by 100, select the newly created measure and click the '%' icon in the formatting ribbon to display it correctly as a percentage.
Looking for a Lightweight and Free Excel Alternative?
While advanced DAX data modeling and Power Pivot are specific to Microsoft environments, WPS Office provides a powerful, free, and lightweight alternative for everyday spreadsheet data analysis. Enjoy seamless compatibility with Microsoft Excel formats alongside intuitive PivotTables, charts, and built-in formulas for your daily reporting needs.
- 1. Download WPS Office: Visit the official WPS website to download and install the free WPS Office suite.
- 2. Open your dataset: Launch WPS Spreadsheet and open your existing Excel workbook.
- 3. Analyze with PivotTables: Go to the Insert tab and select PivotTable to analyze and filter your data dynamically without requiring advanced data modeling.

Frequently Asked Questions
Why is my DAX measure not changing when I click a slicer?
You might be using the ALL function instead of ALLSELECTED in your CALCULATE statement. The ALL function removes all filters entirely, ignoring your slicer selections, whereas ALLSELECTED respects filters applied outside the visual.
Should I manually multiply my DAX percentage formula by 100?
No, it is highly recommended to output the raw decimal value from the DIVIDE function and format the measure itself as a percentage using the data formatting tab. This ensures accurate aggregation and charting.
Can I use this ALLSELECTED DAX formula in Excel Power Pivot?
Yes, the ALLSELECTED DAX function behaves identically in both Microsoft Excel Power Pivot and Power BI for managing filter contexts and slicer interactions.




