Finding out # active periods for sales

How do I use the custom mode (or another way) to count the number of periods where a dimension has a value? It is easy to visualize it but is there a way to count the number of periods and present it as a value on column? Period_Days and Period_Count don’t give me active periods.