Phil Seamark provides some guidance:
Counting transactions is one of the most common things a retail model is asked to do. How many transactions did we do in March. How many in New Zealand. How many involved a T-shirt.
The obvious measure is the one everybody writes:
Transactions = DISTINCTCOUNT ( FactTransaction[TransactionID] )
It is correct, and on a large fact table it is one of the most expensive things you can ask the storage engine to do.
Read on for a better alternative, and more importantly, when it’s a better alternative.