You are a data analyst for a company and are building a Power BI report. The data model includes a 'Sales' table with a [SalesAmount] column and a 'Product' table with a [Category] column.
You need to create a DAX measure that calculates the total sales amount only for the 'Bikes' product category. This measure must always show the 'Bikes' total, regardless of any user selections on the 'Product'[Category] column in a slicer or visual.
Which of the following DAX expressions correctly creates this measure?
The correct DAX expression is CALCULATE(SUM('Sales'[SalesAmount]), 'Product'[Category] = "Bikes").
The CALCULATE function modifies the filter context in which its expression (the first argument) is evaluated. When a simple boolean expression like 'Product'[Category] = "Bikes" is used as a filter argument, it overwrites any existing filters on the 'Product'[Category] column. This ensures that no matter what category is selected in a slicer, this measure will ignore that selection and apply its own filter context, calculating the sum of SalesAmount exclusively for the 'Bikes' category.
The expression using FILTER('Product', ...) is incorrect because FILTER by itself respects the existing filter context. If a user filters the report to 'Clothing', the FILTER function would be evaluated on a Product table that no longer contains 'Bikes', resulting in a blank value.
The expression using KEEPFILTERS is incorrect because its purpose is to preserve the existing filter context and find the intersection with the new filter. This is the opposite of the requirement, as it would only show a value if 'Bikes' was part of the user's selection.
The expression using ALL('Product'[Category]) is incorrect because it only removes the filter from the Category column but does not apply a new filter for 'Bikes'. This would result in calculating the total sales for all categories.
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 is the purpose of the CALCULATE function in DAX?
Open an interactive chat with Bash
Why does `'Product'[Category] = "Bikes"` overwrite existing filters instead of respecting them?
Open an interactive chat with Bash
How does the FILTER function differ from using boolean expressions in CALCULATE?
Open an interactive chat with Bash
Microsoft Power BI Data Analyst
Model 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 .