Forum Discussion

Linger's avatar
Linger
Frequent Visitor
6 years ago
Solved

Distinctcount active customers based on Sales 12M

Hi Power BI Community,   I have a requirement that I just can't get my head around. As an example I have used a calendar table and a simple data table with the columns: Customer ID, Date and Sales...
  • Anonymous's avatar
    Anonymous
    6 years ago
    [# Active Cust] =
    var __activeCusts =
    	FILTER(
    		Customers, // must be a dimension
    		[Sales 12M] > 0
    	)
    return
    	COUNTROWS( __activeCusts )

     

    Best

    D