Your Power BI data model contains an imported table named Sales. Each row represents a single transaction, but some historic rows contain a blank value in the OrderID column. You must add a measure called Total Transactions that returns the count of all rows-regardless of blanks-while using the most efficient single-aggregation function available. Which DAX expression should you create?
Total Transactions = COUNTA(Sales[OrderID])
Total Transactions = DISTINCTCOUNT(Sales[OrderID])
COUNTROWS counts every row in the table argument, so it returns the total number of transactions even when OrderID is blank and performs more efficiently than COUNT or COUNTA on a column. COUNT and COUNTA ignore blank values in the specified column, so they would undercount in this scenario. DISTINCTCOUNT returns the number of unique OrderID values rather than the total row count, so it does not meet the requirement.
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 COUNTROWS function in DAX?
Open an interactive chat with Bash
What is the difference between COUNTROWS and COUNTA in DAX?
Open an interactive chat with Bash
When should DISTINCTCOUNT be used instead of COUNTROWS 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 .