0
0
Power BIbi_tool~10 mins

VALUES and DISTINCT in Power BI - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to return a unique list of products from the Sales table.

Power BI
UniqueProducts = [1](Sales[Product])
Drag options to blanks, or click blank then click option'
AFILTER
BSUM
CVALUES
DCALCULATE
Attempts:
3 left
💡 Hint
Common Mistakes
Using SUM instead of VALUES returns a number, not unique values.
Using FILTER without a condition does not return unique values.
2fill in blank
medium

Complete the code to get a distinct list of customer IDs from the Customers table.

Power BI
DistinctCustomers = [1](Customers[CustomerID])
Drag options to blanks, or click blank then click option'
ADISTINCT
BSUMMARIZE
CCOUNTROWS
DRELATED
Attempts:
3 left
💡 Hint
Common Mistakes
Using COUNTROWS returns a count, not unique values.
Using RELATED is for relationships, not for unique value lists.
3fill in blank
hard

Fix the error in the code to return unique product categories from the Products table.

Power BI
UniqueCategories = DISTINCT([1])
Drag options to blanks, or click blank then click option'
AProducts->Category
BProducts[Category]
CProducts(Category)
DProducts.Category
Attempts:
3 left
💡 Hint
Common Mistakes
Using dot notation like Products.Category is invalid in DAX.
Using parentheses or arrows for column reference causes syntax errors.
4fill in blank
hard

Fill both blanks to create a measure that counts distinct customers who made sales.

Power BI
DistinctCustomerCount = COUNTROWS([1]([2]))
Drag options to blanks, or click blank then click option'
AVALUES
BSales[CustomerID]
CDISTINCT
DCustomers[CustomerID]
Attempts:
3 left
💡 Hint
Common Mistakes
Using Customers[CustomerID] instead of Sales[CustomerID] counts all customers, not just those who made sales.
Using DISTINCT instead of VALUES works but here VALUES is preferred for this context.
5fill in blank
hard

Fill all three blanks to create a table of distinct product names and their categories from the Products table.

Power BI
DistinctProducts = SUMMARIZE([1], [2], [3])
Drag options to blanks, or click blank then click option'
AProducts
BProducts[ProductName]
CProducts[Category]
DSales
Attempts:
3 left
💡 Hint
Common Mistakes
Using Sales table instead of Products returns unrelated data.
Using columns from different tables causes errors.