Complete the code to count all rows in the Sales table.
TotalRows = [1](Sales)The COUNTROWS function counts all rows in a table. Here, it counts all rows in the Sales table.
Complete the code to count unique Customer IDs in the Sales table.
UniqueCustomers = [1](Sales[CustomerID])DISTINCTCOUNT counts unique values in a column. Here, it counts unique Customer IDs.
Fix the error in the code to count unique Product IDs.
UniqueProducts = COUNTROWS([1](Sales[ProductID]))To count unique Product IDs using COUNTROWS, wrap the column with DISTINCT to get unique values as a table.
Fill both blanks to count all non-blank Sales amounts.
NonBlankSales = [1](Sales[Amount]) - [2](Sales[Amount])
COUNT counts non-blank numeric values. COUNTBLANK counts blank values. Subtracting blanks from total counts non-blank values.
Fill all three blanks to count unique Product IDs sold in 2023.
UniqueProducts2023 = COUNTROWS(FILTER([1](Sales[ProductID]), Sales[Year] [2] [3]))
DISTINCT gets unique Product IDs as a table. FILTER keeps only rows where Year equals 2023. COUNTROWS counts those unique products.