DISTINCTCOUNT

Counts unique values.

Syntax

DISTINCTCOUNT(Table[Column])

Example

Unique Customers :=

DISTINCTCOUNT(Sales[CustomerID])

If the same customer makes five orders, that customer is counted only once.

RELATED

RELATED retrieves a value from a related table.

Example

Suppose Sales contains ProductID and Products contains Product Category.

A calculated column can retrieve the category:

Product Category :=

RELATED(Products[Category])

Practice

Create:

Unique Customers :=

DISTINCTCOUNT(Sales[CustomerID])

and a calculated column that retrieves Product Category using RELATED.