You are building a measure named CurrentYearSales in a Power BI model that contains a fact table Sales and dimension tables Date and Product. The measure must always return total sales for the current calendar year regardless of any Product slicers or filters, while keeping all other report filters in effect. Which DAX expression should you use?
Inside CALCULATE, ALL('Product') discards every filter that originates from any column in the Product table. ALL('Date') removes every filter from the Date table, ensuring the result is not affected by Year, Month, or other date slicers. The boolean filter YEAR('Date'[Date]) = YEAR(TODAY()) then reapplies the current-year condition. Because CALCULATE applies filters in sequence, ALL('Date') clears the table first and the predicate adds back only the rows for the current calendar year. The other expressions either leave some Product filters in place or fail to remove existing Date filters, so they do not always return the correct value.
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 role of the ALL function in the correct DAX expression?
Open an interactive chat with Bash
Why is YEAR('Date'[Date]) = YEAR(TODAY()) necessary in the expression?
Open an interactive chat with Bash
How does CALCULATE handle the sequence of filters in DAX?
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 .