You manage a Power BI model that contains a daily balance table named InventorySnapshot with columns [Date] and [InventoryQty]. Report users need a measure that returns the inventory quantity on the last calendar day in the current filter context (for example, the 30 June value when the visual is grouped by month). Which DAX function should you use to create this semi-additive measure so that the value aggregates correctly across different time levels?
CLOSINGBALANCEMONTH is designed for semi-additive scenarios in which you must return the expression evaluated on the last date of the month within the current context. Unlike TOTALMTD, which sums values across all days, or LASTDATE combined with CALCULATE, which can fail when dates have no data, CLOSINGBALANCEMONTH automatically searches back to the last non-blank date. SUMX simply aggregates rows and provides no logic for end-of-period selection.
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 a semi-additive measure in Power BI?
Open an interactive chat with Bash
Why is CLOSINGBALANCEMONTH better than LASTDATE in this scenario?
Open an interactive chat with Bash
When should you use SUMX instead of semi-additive functions?
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 .