0
0
Power BIbi_tool~20 mins

Handling null and blank values in Power BI - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Null and Blank Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
dax_lod_result
intermediate
2:00remaining
DAX Measure Output with BLANK Handling
Given the following DAX measure, what is the output when the SalesAmount column contains some BLANK values?

Average Sales = AVERAGEX(FILTER(Sales, NOT(ISBLANK(Sales[SalesAmount]))), Sales[SalesAmount])
ACalculates average ignoring BLANK values
BReturns BLANK if any BLANK exists in SalesAmount
CCalculates average including BLANK as zero
DThrows an error due to ISBLANK usage
Attempts:
2 left
💡 Hint
Think about how FILTER and ISBLANK work together to exclude BLANKs.
visualization
intermediate
2:00remaining
Best Visualization to Show Missing Data
You want to create a report that clearly shows which product categories have missing sales data (null or blank). Which visualization type is best suited for this purpose?
AStacked bar chart showing counts of missing vs non-missing per category
BLine chart showing sales trend over time
CPie chart showing total sales by category
DScatter plot of sales amount vs product price
Attempts:
2 left
💡 Hint
Think about how to compare missing and present data side by side.
data_modeling
advanced
2:00remaining
Handling Nulls in Relationships
In your data model, the 'CustomerID' column in the Sales table has some null values. What is the best practice to handle these nulls to maintain accurate relationships with the Customers table?
ACreate a many-to-many relationship to handle nulls
BReplace null CustomerID with a placeholder value and create a dummy customer record
CDelete all sales records with null CustomerID
DLeave nulls as is and create a relationship ignoring nulls
Attempts:
2 left
💡 Hint
Think about how relationships require matching keys and how to handle unmatched keys.
🎯 Scenario
advanced
2:00remaining
Scenario: Calculating Total Sales with Nulls
You have a SalesAmount column with some null values. You want to calculate total sales treating nulls as zero. Which DAX measure achieves this correctly?
ATotal Sales = SUMX(Sales, Sales[SalesAmount])
BTotal Sales = SUM(Sales[SalesAmount])
CTotal Sales = SUMX(Sales, IF(ISBLANK(Sales[SalesAmount]), 0, Sales[SalesAmount]))
DTotal Sales = CALCULATE(SUM(Sales[SalesAmount]), NOT(ISBLANK(Sales[SalesAmount])))
Attempts:
2 left
💡 Hint
Consider how SUM handles BLANKs and how to replace them with zero.
🔧 Formula Fix
expert
2:00remaining
Debugging Unexpected BLANK Result
You wrote this DAX measure:

Measure = IF(COUNTROWS(FILTER(Sales, Sales[Amount] = BLANK())) > 0, "Has Nulls", "No Nulls")

But it always returns "No Nulls" even when there are null values. What is the cause?
AMeasure should use SUM instead of COUNTROWS
BCOUNTROWS cannot count filtered rows correctly
CFILTER syntax is incorrect; missing parentheses
DBLANK() cannot be compared with = operator; use ISBLANK() instead
Attempts:
2 left
💡 Hint
Think about how to check for BLANK values in DAX conditions.