You are designing a clustered bar chart that shows a measure named SalesAmount by ProductSubcategory. The chart can be affected by page-level filters, report-level filters, and slicers (for example, a ProductCategory slicer). You need a data label that displays each subcategory's percentage contribution to the total sales after any of those filters are applied, but regardless of the filter coming from the visual's category axis. Which DAX expression should you use for the Subcategory % of Total measure?
The measure must divide the current filter-context value of SalesAmount by a total that ignores only the filters coming from the visual's ProductSubcategory axis while preserving every filter explicitly applied elsewhere (page, report, or slicer). CALCULATE with ALLSELECTED('Product') removes the visual's row/column filters but restores the outer filter context, so slicers on Product tables (for example, ProductCategory) and filters from other tables (Date, Geography, etc.) remain active. ALL('Product') removes all Product filters, including slicer filters, producing an incorrect denominator. ALLEXCEPT keeps the ProductSubcategory filter, so the percentage is always 100 %. REMOVEFILTERS() with no arguments clears all filters in the report, returning the grand total. Re-applying the selected subcategory in a FILTER expression again yields the numerator, not the total.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What does ALLSELECTED do in DAX?
Open an interactive chat with Bash
Why is CALCULATE used with ALLSELECTED in the DAX expression?
Open an interactive chat with Bash
What is the difference between ALL and ALLSELECTED in DAX?
Open an interactive chat with Bash
Microsoft Power BI Data Analyst
Visualize and Analyze the Data
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99
$19.99/mo
Billed monthly, Cancel any time.
3 Month Pass
$44.99
$14.99/mo
One time purchase of $44.99, Does not auto-renew.
MOST POPULAR
Annual Pass
$119.99
$9.99/mo
One time purchase of $119.99, Does not auto-renew.
BEST DEAL
Lifetime Pass
$189.99
One time purchase, Good for life.
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .